z@rocksvax.UUCP (Jim Ziobro) (12/19/84)
/***** rocksvax:net.unix-wizards / chalmers!bernerus / 3:50 pm Dec 14, 1984*/ Subject: Killing background processes at logout (AGAIN) Chris. ...!mcvax!enea!chalmers!bernerus /* ---------- */ These are the changes I made to sysline.c to make it die when the user logged off. It works for all hardwired terminals. It still has a problem on ptys though. //Z\\ ------ 64a65,66 > #include <sgtty.h> > #include <sys/file.h> 356c358,366 < if(!emacs && !dbug && fork()) exit(0); --- > if(!emacs && !dbug && fork()) {exit(0); } > else > { int pgrp; > /* We want to die on hangup */ > int ttyfd=open("/dev/tty",O_WRONLY,0); > ioctl(ttyfd, TIOCGPGRP, &pgrp); > setpgrp(0, pgrp); > }; > -- //Z\\ James M. Ziobro Ziobro.Henr@Xerox.ARPA {rochester,amd,sunybcs,allegra}!rocksvax!z