[net.unix] ps problem

sdb@whuxlm.UUCP (Brener Stanley) (01/25/85)

The command:

   nohup ps &

does not produce any output on my 3b20S.


Running

	nohup ps -u name &

does produce output.

Can someone explain?

acheng@uiucdcs.UUCP (01/28/85)

/* Written  8:31 am  Jan 25, 1985 by sdb@whuxlm in uiucdcs:net.unix */
/* ---------- "ps problem" ---------- */
The command:

   nohup ps &

does not produce any output on my 3b20S.
/* End of text from uiucdcs:net.unix */

If you were on the bourn shell (typically with a $ prompt), the
output of "ps" has been routed to file "nohup.out".  Have you
checked that?

alan@drivax.UUCP (Alan Fargusson) (01/30/85)

> The command:
> 
>    nohup ps &
> 
> does not produce any output on my 3b20S.

I found that 'ps 2>temp' also dosen't work. I think that ps
uses fd 2 to find out what your process group is, and nohup
redirects it so ps can't find out your process group.
-- 

Alan Fargusson.

{ ihnp4, sftig, amdahl, ucscc, ucbvax!unisoft }!drivax!alan

mkg@whuxlm.UUCP (Marsh Gosnell) (01/30/85)

The reason "nohup ps &" produces no output (it just prints the header
line) is that ps with no args defaults to the "current" tty.  The name
of the"current" tty is derived via a ttyname() call which, since stderr is
redirected into a file by nohup does not yield the desired result.
  Marsh Gosnell  whuxlk!mkg  AT&T Bell Laboratories