tcp/udpsvd: robustify SIGCHLD handling

function                                             old     new   delta
if_verbose_print_connection_status                     -      40     +40
tcpudpsvd_main                                      1798    1794      -4
connection_status                                     31       -     -31
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 40/-35)              Total: 5 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2021-06-05 15:24:04 +02:00
parent ac444861b0
commit d3e1090308
2 changed files with 27 additions and 11 deletions

View File

@@ -380,7 +380,10 @@ static void startservice(struct svdir *s)
xdup2(logpipe.wr, 1);
}
}
/* Non-ignored signals revert to SIG_DFL on exec anyway */
/* Non-ignored signals revert to SIG_DFL on exec anyway.
* But we can get signals BEFORE execl(), this is unlikely
* but wouldn't be good...
*/
/*bb_signals(0
+ (1 << SIGCHLD)
+ (1 << SIGTERM)