Test for background process

Jimmy Aitken jimmy at rlvd.UUCP
Mon Jan 14 19:59:16 AEST 1985


I am trying to detect uniquely when one of the following situations occurs
in a C program.  I have tried isatty(3) but cannot distinguish between a),
b), and c) below.  Any helpful pointers would be appreciated.


	a) The standard input has been re-directed in a foreground process
	b) The standard input has been re-directed in a background process
	c) No re-direction of standard input in a background process
	d) No re-direction of standard input in a foreground process



More information about the Comp.lang.c mailing list