ok so i have been writing my own ps program for an assignment and it needs to have the option -A which is fine, apart from choosing what to display when -A is not selected.
It is meant to display as ps does and only show the processes associated with the same terminal as the invoker. What I am tearing my hair out with is that i dont know how, in c, to find out what the invoking terminal is!!
So if anyone can lend me a hand, much appreciated