kumquat-buildroot/package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch
Gustavo Zacarias b59f9e1562 busybox: add new 1.20.0, remove deprecated, mark 1.18.x deprecated
Add version 1.20.0, remove deprecated 1.16.x & 1.17.x versions and mark
1.18.x as deprecated.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-29 10:51:14 +02:00

18 lines
477 B
Diff

--- busybox-1.20.0/loginutils/getty.c
+++ busybox-1.20.0-getty/loginutils/getty.c
@@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, ch
*/
fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
if (fd >= 0) {
+ /* TIOCNOTTY sends SIGHUP to the foreground
+ * process group - which may include us!
+ * Make sure to not die on it:
+ */
+ sighandler_t old = signal(SIGHUP, SIG_IGN);
ioctl(fd, TIOCNOTTY);
close(fd);
+ signal(SIGHUP, old);
}
}