apply BusyBox 1.20.0 hotfixes
[busybox-power] / debian / patches / hotfixes / busybox-1.20.0-getty.patch
1 --- busybox-1.20.0/loginutils/getty.c
2 +++ busybox-1.20.0-getty/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         }
17