Annotation of /trunk/busybox/patches/busybox-1.10.2-hush.patch
Parent Directory | Revision Log
Revision 626 -
(hide annotations)
(download)
Sat May 31 10:33:24 2008 UTC (16 years, 4 months ago) by niro
File size: 1310 byte(s)
Sat May 31 10:33:24 2008 UTC (16 years, 4 months ago) by niro
File size: 1310 byte(s)
-added more official fixes
1 | niro | 626 | --- busybox-1.10.2/shell/hush.c Sat Apr 19 05:50:31 2008 |
2 | +++ busybox-1.10.2-hush/shell/hush.c Mon May 26 00:32:40 2008 | ||
3 | @@ -699,9 +699,18 @@ | ||
4 | BLTIN(NULL, NULL, NULL) | ||
5 | }; | ||
6 | |||
7 | +/* Signals are grouped, we handle them in batches */ | ||
8 | +static void set_misc_sighandler(void (*handler)(int)) | ||
9 | +{ | ||
10 | + bb_signals(0 | ||
11 | + + (1 << SIGINT) | ||
12 | + + (1 << SIGQUIT) | ||
13 | + + (1 << SIGTERM) | ||
14 | + , handler); | ||
15 | +} | ||
16 | + | ||
17 | #if ENABLE_HUSH_JOB | ||
18 | |||
19 | -/* Signals are grouped, we handle them in batches */ | ||
20 | static void set_fatal_sighandler(void (*handler)(int)) | ||
21 | { | ||
22 | bb_signals(0 | ||
23 | @@ -725,14 +734,6 @@ | ||
24 | + (1 << SIGTTOU) | ||
25 | , handler); | ||
26 | } | ||
27 | -static void set_misc_sighandler(void (*handler)(int)) | ||
28 | -{ | ||
29 | - bb_signals(0 | ||
30 | - + (1 << SIGINT) | ||
31 | - + (1 << SIGQUIT) | ||
32 | - + (1 << SIGTERM) | ||
33 | - , handler); | ||
34 | -} | ||
35 | /* SIGCHLD is special and handled separately */ | ||
36 | |||
37 | static void set_every_sighandler(void (*handler)(int)) | ||
38 | @@ -815,7 +816,6 @@ | ||
39 | |||
40 | #define set_fatal_sighandler(handler) ((void)0) | ||
41 | #define set_jobctrl_sighandler(handler) ((void)0) | ||
42 | -#define set_misc_sighandler(handler) ((void)0) | ||
43 | #define hush_exit(e) exit(e) | ||
44 | |||
45 | #endif /* JOB */ | ||
46 | @@ -3907,8 +3907,10 @@ | ||
47 | /* give up */ | ||
48 | interactive_fd = 0; | ||
49 | } | ||
50 | - if (interactive_fd) | ||
51 | + if (interactive_fd) { | ||
52 | fcntl(interactive_fd, F_SETFD, FD_CLOEXEC); | ||
53 | + set_misc_sighandler(SIG_IGN); | ||
54 | + } | ||
55 | } | ||
56 | #endif | ||
57 |