Red Hat Bugzilla – Bug 46223
"telinit s", "telinit 1" don't work properly
Last modified: 2014-03-16 22:21:25 EDT
I believe that both "telinit s" and "telinit 1" are supposed to shut down
all multi-user processes, by calling shutdown scripts and then sending them
kill signals, and then start a single-user shell on the console. I believe
that both "telinit s" and "telinit 1" did this properly in the past,
although my recollection may be flawed. Neither of them works properly
First of all, "telinit s" doesn't call any of the shutdown scripts; I'm not
sure whether it sends the kill signals that it's supposed to. But I doubt
it, because after running it, both the single-user shell and the multi-user
shell from which I did the "telinit s" are running on the console at the
same time! This makes it rather difficult to type commands, since the two
shells running on the same tty compete for who gets the input.
When I run "telinit 1" instead of "telinit s", all the shutdown scripts get
called, but again, my multi-user shell remains running on the console after
the single-user shell is started.
I suspect that "telinit s" isn't supposed to run the shutdown scripts while
"telinit 1" is, but both of them are supposed to send kill signals to all
the outstanding processes before starting the single-user shell, and
neither of them is doing that right now, and that's the bug.
Fixed in util-linux-2.11f-6. (Alternatively, downgrade to util-linux previous
to 2.11.) login was calling setsid() before exec()ing the shell, and it really
shouldn't do that.
This bug (i.e., you have two shells running on your TTY at the same time after
doing "telinit 1") is back in util-linux-2.11f-15. Grr.
*** This bug has been marked as a duplicate of 55545 ***
*** This bug has been marked as a duplicate of 54865 ***