wok-6.x view busybox/stuff/busybox-1.20-getty.u @ rev 12748
ziproxy: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed May 09 23:17:41 2012 +0200 (2012-05-09) |
parents | |
children |
line source
1 --- busybox-1.20.0/loginutils/getty.c
2 +++ busybox-1.20.0/loginutils/getty.c
3 @@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, ch
4 */
5 fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
6 if (fd >= 0) {
7 + /* TIOCNOTTY sends SIGHUP to the foreground
8 + * process group - which may include us!
9 + * Make sure to not die on it:
10 + */
11 + sighandler_t old = signal(SIGHUP, SIG_IGN);
12 ioctl(fd, TIOCNOTTY);
13 close(fd);
14 + signal(SIGHUP, old);
15 }
16 }