[Bug 707151] Re: init: keyboard-request event not emitted due to closing console fd too early
Steve Langasek
steve.langasek at canonical.com
Thu Sep 29 21:15:39 UTC 2011
marking fixed in Ubuntu, since 1.3 is in oneiric.
** Changed in: upstart (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/707151
Title:
init: keyboard-request event not emitted due to closing console fd too
early
Status in Upstart:
Fix Released
Status in “upstart” package in Ubuntu:
Fix Released
Bug description:
I saw this in 0.6.5-9 on Fedora 14, but it appears to still be present.
Typing the key combination bound to KeyboardSignal should result in the
kernel sending SIGWINCH to init, which in turn should generate a
keyboard-request event. However, debugging shows that a signal is
never sent, and in fact init does not handle SIGWINCH.
The root cause of both issues is that the KDSIGACCEPT ioctl call around
line 251 of init/main.c fails with ENOTTY, and thus the signal handler
is never installed. This is because fd 0 is no longer connected to the
console; after system_setup_console(CONSOLE_NONE, FALSE) around line
173, fd 0 is connected to /dev/null. Naturally, KDSIGACCEPT is indeed
not appropriate to /dev/null.
The solution is either to defer the second system_setup_console() until
after signal handlers are set up, or move the ioctl call to the point
where fd 0 is still connected to the console. Not redirecting to
/dev/null at all would also work, but would reintroduce #486005.
To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/707151/+subscriptions
More information about the foundations-bugs
mailing list