summaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
authorDenys Vlasenko2012-05-28 02:48:55 +0200
committerDenys Vlasenko2012-05-28 02:48:55 +0200
commitaa4e5092f58f5a11018e569aee9cf037daf8c5d6 (patch)
treef8c01df8f7eb3dda4c0292df3548d9fced5e3297 /loginutils/getty.c
parentf5234398ef3010b68468cafe3e2ea89b2bb08a17 (diff)
downloadbusybox-1_20_1.zip
busybox-1_20_1.tar.gz
Apply post-1.20.0 patches, bump version to 1.20.11_20_1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index afb411b..bbb5a96 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, char **argv)
*/
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);
}
}