strange behavior of nohup

Michael "Ford" Ditto ditto at cbmvax.UUCP
Fri Mar 31 14:54:30 AEST 1989


In article <17168 at cisunx.UUCP> jcbst3 at unix.cis.pittsburgh.edu (James C. Benz) writes:
>nohup demon options 1>/dev/null 2>/dev/null&
>
>Having executed this line and exiting back to the $ prompt, I then press
>^D to exit the shell.  Normally, this would get me back to the ua window
>environment, but after running the nohup, ^D hangs the Full-screen Unix
>window (Sys V version 3.51) and the only way I can get rid of it is to 
>open another Unix window and explicitly kill the demon process that was
>run with the nohup.  Once this is done, the hung window disappears and

Try: nohup demon options 1>/dev/null 2>/dev/null 0</dev/null &

The window will stay around as long as something has it open, and your
"demon" will have the window open as its standard input.  The window
is not "hung" at all, it's just that once your shell exits, there is
no program reading what you type.  If your "demon" program ever reads
from stdin, it would read whatever you typed in the window.  Adding
the stdin redirection as I show above should make everything work as
you expect.
-- 
					-=] Ford [=-

"This is yet another example of how	In Real Life:  Mike Ditto)
our actions have random results."	ford at kenobi.cts.com
	- Cmdr. Data ("Contagion")	...!sdcsvax!crash!elgar!ford
					ditto at cbmvax.commodore.com



More information about the Unix-pc.general mailing list