[BusyBox] Is there an "init" standard?

Rob Landley rob at landley.net
Sat Jul 10 21:09:50 UTC 2004


On Tuesday 06 July 2004 12:58, Charlie Brady wrote:

> Could it be related to this part of exit() behaviour?
>
>        If the process is a session leader and its controlling terminal the
>        controlling terminal of the session, then each pro­
>        cess in the foreground process group of this controlling terminal
>        is sent a SIGHUP signal, and the terminal is disasso­
>        ciated from this session, allowing it to be acquired by a new
>        controlling process.

Yeah, except this code triggers when the process we forked off _exits_, and 
that guy was (presumably) in control of the terminal.  We only need to steal 
it back if somebody ELSE (presumably one of its child processes) is now in 
control of the terminal.  We fork off a process that becomes a new process 
leader, grabs control of the terminal, and then exits...

I'm just wondering what an example of a problem that would require this code 
to fix would be.  Presumably, if a process (running as root) can grab a 
terminal from another process, then the next getty process we spawn on that 
terminal will happily grab it.  If we don't run another one, then what's the 
down side of whoever else has it keeping it until they exit?

> > 3) The behavior of different kernel versions apparently varies here.
>
> That's not apparent to me :-)  Which version behaves differently, and how?

I wrote that last week when I was less sleep deprived, and don't remember.  
Something between 2.6 and 2.4 or 2.2, I expect.  Probably not important.

I'll try to make some time to thump on it a bit tomorrow...

Rob
-- 
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas.  (I'm the con chair.)





More information about the busybox mailing list