diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-05-28 02:48:55 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-05-28 02:48:55 +0200 |
| commit | aa4e5092f58f5a11018e569aee9cf037daf8c5d6 (patch) | |
| tree | f8c01df8f7eb3dda4c0292df3548d9fced5e3297 /loginutils | |
| parent | f5234398ef3010b68468cafe3e2ea89b2bb08a17 (diff) | |
| download | busybox-w32-1_20_1.tar.gz busybox-w32-1_20_1.tar.bz2 busybox-w32-1_20_1.zip | |
Apply post-1.20.0 patches, bump version to 1.20.11_20_1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
| -rw-r--r-- | loginutils/getty.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index afb411b98..bbb5a96b4 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c | |||
| @@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, char **argv) | |||
| 561 | */ | 561 | */ |
| 562 | fd = open("/dev/tty", O_RDWR | O_NONBLOCK); | 562 | fd = open("/dev/tty", O_RDWR | O_NONBLOCK); |
| 563 | if (fd >= 0) { | 563 | if (fd >= 0) { |
| 564 | /* TIOCNOTTY sends SIGHUP to the foreground | ||
| 565 | * process group - which may include us! | ||
| 566 | * Make sure to not die on it: | ||
| 567 | */ | ||
| 568 | sighandler_t old = signal(SIGHUP, SIG_IGN); | ||
| 564 | ioctl(fd, TIOCNOTTY); | 569 | ioctl(fd, TIOCNOTTY); |
| 565 | close(fd); | 570 | close(fd); |
| 571 | signal(SIGHUP, old); | ||
| 566 | } | 572 | } |
| 567 | } | 573 | } |
| 568 | 574 | ||
