wok view busybox/stuff/busybox-1.20-getty.u @ rev 12732

busybox: add getty fix from busybox.net
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 06 18:15:24 2012 +0200 (2012-05-06)
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 }