Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 95 11:47:57 MST
From:      terry@cs.weber.edu (Terry Lambert)
To:        root@vhf.dataradio.com (Charlie ROOT)
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: Odd behaviour in 2.0R
Message-ID:  <9502241847.AA27779@cs.weber.edu>
In-Reply-To: <Pine.NEB.3.91.950224093650.890C-100000@vhf.dataradio.com> from "Charlie ROOT" at Feb 24, 95 09:48:35 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > If they are background tasks, they aren't supposed to die when the user
> > logs out if they were started from a shell other than sh, or if they
> > were started in sh with "nohup".
> 
> Terry, thank you for your prompt reply!
> 
> Ok, but on FreeBSD 1.1.5.1, and on a SVR3.2 box, all processes die off when 
> the user logs out, including the background ones, unless specifically run
> with nohup.
> 
> For example, last night, my X server stopped (I sent a HUP signal to it), 
> but all the programs that were running kept running on unconnected 
> virtual terminals!

OK, this is where the potential contention lies.  The current code
doesn't SIGHUP on process group leader death in accordance with
POSIX and SVR4.  The previous code was more like BSD 4.3.

Some people think it is the responsibility of the group leader (in this
case, xterm) to "do the right thing".

Unfortunately, these same people don't explaing why the right thing
happens under SVR4 (POSIX model) but not under BSD (POSIX model).

I think the signal needs to be propagated to all children of the group
leader *bfore* they become group leaders themselves, but processed
by them *after* they ar promoted.

This would result in the "expected" behaviour.

The problem is in controlling tty revocation, since the tty is
revoked from everone at once but the HUP is only delivered to the
group leader at the time.  The other processes get their tty
revoked but they don't get a HUP because they aren't group leaders
at the time (as would be the case in SVR4).

Currently, this code is kinda a mess.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9502241847.AA27779>