Re: init scripts and su
In article <firstname.lastname@example.org>,
Russell Coker <email@example.com> wrote:
>On Wed, 28 Jul 2004 20:04, "Miquel van Smoorenburg" <firstname.lastname@example.org>
>> >Ideally yes. But that involves proxying all operations on the pseudo-tty
>> >which is quite a difficult task.
>> Wait a minute. Is this about TIOCSTI only ? You can only use TIOCSTI
>> on your controlling tty. After calling setsid(), stdin/stdout/stderr
>> are still connected to the tty, but that tty isn't the controlling
>> tty anymore. So TIOCSTI doesn't work at all.
>> Perhaps start-stop-daemon should have a command line option that
>> makes it fork() and setsid() (--setsid ?)
>Why would it ever be desirable to not have start-stop-daemon call setsid()?
Don't know .. you have to do an extra fork() (and wait() for it) in
start-stop-daemon, so it might be a tad slower (a ms at most).
There are also people using start-stop-daemon for all other kinds
of things, as replacement for 'su' (--start --chuid xx --exec /bla/bla)
and doing setsid() might break those applications .. but you could
argue that setsid should be used esp. in the --chuid case
>I think that we should just have start-stop-daemon call setsid() regardless.
An unconditional change would have to go in after sarge, in case
it breaks something .. it needs a long period of testing I think.
The question is, what is a "manamanap".
The question is, who cares ?