aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2025-08-11 01:14:43 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2025-08-11 01:17:02 +0200
commite660eab45867748ccf9dd8d5ddbdb5815381d4a7 (patch)
tree8585d8074d29431412a8b8cf60091dc612ba0481 /shell
parentea2022efb32661e33ec43f3cd9f5cae8bc2b9547 (diff)
downloadbusybox-w32-e660eab45867748ccf9dd8d5ddbdb5815381d4a7.tar.gz
busybox-w32-e660eab45867748ccf9dd8d5ddbdb5815381d4a7.tar.bz2
busybox-w32-e660eab45867748ccf9dd8d5ddbdb5815381d4a7.zip
*: code shrink using sigprocmask2() where appropriate
function old new delta sig_unblock 41 43 +2 sig_block 41 40 -1 sigprocmask_allsigs 33 31 -2 wait_for_child_or_signal 202 193 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 2/-12) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/hush.c b/shell/hush.c
index ad078ee54..a0601b2a3 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -12177,7 +12177,7 @@ static int wait_for_child_or_signal(struct pipe *waitfor_pipe, pid_t waitfor_pid
12177 debug_printf_exec("job_exited_or_stopped:%d\n", rcode); 12177 debug_printf_exec("job_exited_or_stopped:%d\n", rcode);
12178 if (rcode >= 0) { 12178 if (rcode >= 0) {
12179 ret = rcode; 12179 ret = rcode;
12180 sigprocmask(SIG_SETMASK, &oldset, NULL); 12180 sigprocmask2(SIG_SETMASK, &oldset);
12181 break; 12181 break;
12182 } 12182 }
12183 } 12183 }
@@ -12195,7 +12195,7 @@ static int wait_for_child_or_signal(struct pipe *waitfor_pipe, pid_t waitfor_pid
12195 ret = 127; 12195 ret = 127;
12196 } 12196 }
12197# endif 12197# endif
12198 sigprocmask(SIG_SETMASK, &oldset, NULL); 12198 sigprocmask2(SIG_SETMASK, &oldset);
12199 break; 12199 break;
12200 } 12200 }
12201 /* Wait for SIGCHLD or any other signal */ 12201 /* Wait for SIGCHLD or any other signal */
@@ -12213,7 +12213,7 @@ static int wait_for_child_or_signal(struct pipe *waitfor_pipe, pid_t waitfor_pid
12213 * making "wait" commands in SCRIPT block forever. 12213 * making "wait" commands in SCRIPT block forever.
12214 */ 12214 */
12215 restore: 12215 restore:
12216 sigprocmask(SIG_SETMASK, &oldset, NULL); 12216 sigprocmask2(SIG_SETMASK, &oldset);
12217 check_sig: 12217 check_sig:
12218 /* So, did we get a signal? */ 12218 /* So, did we get a signal? */
12219 sig = check_and_run_traps(); 12219 sig = check_and_run_traps();