wok-6.x view busybox/stuff/busybox-1.20-getty.u @ rev 12825
libffi: we need it in ARM :-)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 22 13:16:18 2012 +0200 (2012-05-22) |
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 }