Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site rocksvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!rocksvax!z
From: z@rocksvax.UUCP (Jim Ziobro)
Newsgroups: net.unix-wizards
Subject: Re: Killing background processes at logout-fix to sysline
Message-ID: <663@rocksvax.UUCP>
Date: Wed, 19-Dec-84 03:24:34 EST
Article-I.D.: rocksvax.663
Posted: Wed Dec 19 03:24:34 1984
Date-Received: Thu, 20-Dec-84 01:32:49 EST
References: <145@chalmers.UUCP>
Organization: Xerox
Lines: 31

/***** 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 
> #include 
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