# HG changeset patch # User Pascal Bellard # Date 1336320924 -7200 # Node ID b18de8ea7bd62e2fec6dfb4c8291ffbbfbbddd1f # Parent e302f23fcd5424950c5fe43576f4aa3ad9a3ee31 busybox: add getty fix from busybox.net diff -r e302f23fcd54 -r b18de8ea7bd6 busybox/receipt --- a/busybox/receipt Sat May 05 19:17:33 2012 +0200 +++ b/busybox/receipt Sun May 06 18:15:24 2012 +0200 @@ -30,6 +30,7 @@ cmdline.u su-nochdir.u diff.u +getty.u EOT cp $stuff/$PACKAGE-${VERSION%.*}.config .config } diff -r e302f23fcd54 -r b18de8ea7bd6 busybox/stuff/busybox-1.20-getty.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.20-getty.u Sun May 06 18:15:24 2012 +0200 @@ -0,0 +1,17 @@ +--- busybox-1.20.0/loginutils/getty.c ++++ busybox-1.20.0/loginutils/getty.c +@@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, ch + */ + 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); + } + } +