summaryrefslogtreecommitdiffstats
path: root/package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch')
-rw-r--r--package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch b/package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch
new file mode 100644
index 000000000..ed52159ff
--- /dev/null
+++ b/package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch
@@ -0,0 +1,17 @@
+--- 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);
+ }
+ }
+