Preventing Idle in telnet, security, and bg.

Paul John Falstad pfalstad at dae.Princeton.EDU
Sat Sep 29 03:07:53 AEST 1990


In article <2903 at idunno.Princeton.EDU> pfalstad at bow.Princeton.EDU (Paul John Falstad) writes:
>Try this in your favorite shell:
>
>$ csh (or whatever)
>% sleep 100 &
>% kill -HUP $$
>$ ps

Well that was dumb of me.  Of course this works in any shell, but it
doesn't prove anything.  The tty driver sends SIGHUP to all processes in
the process group associated with the terminal when you logout.  So if
your login shell is sh, all your &'d processes will get killed when you
logout because sh doesn't create a new process group for its children.
All children of the shell have the same process group of the shell.
csh creates new process groups for all the children it spawns, so they
will not get the SIGHUP when the tty is closed.  Sorry.

-- <- Pnews isn't printing this line.  Anyone know why?
Here is the address to complain to:
pfalstad at phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD CIS: 70016,1355
That address again,
sync at thumper.princeton.edu PLink:OHS738 GEnie:OHS738 CIS: 4128 143 1234 937



More information about the Comp.unix.questions mailing list