background processes under 4.2bsd
Jonathan Biggar
jonab at sdcrdcf.UUCP
Wed Feb 22 03:08:28 AEST 1984
In article <989 at druxy.UUCP> jas at druxy.UUCP (ShanklandJA) writes:
>Question: How do you start a background process at login time
>that is guaranteed to terminate when the user logs out (or is
>logged out)?
You could have a line like:
if ("`tty`" == "not a tty") exit
in your loop. This will test stderr to see if it is still
attached to a terminal, and if not, will cause the program to exit.
This is only tested on 4.1, but I would assume it would work for
4.2 also.
Jon Biggar
{allegra,burdvax,cbosgd,hplabs,ihnp4,sdccsu3,trw-unix}!sdcrdcf!jonab
More information about the Comp.unix.wizards
mailing list