summaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2025-07-30 20:02:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2025-07-30 20:02:23 +0200
commita98b95b715359a8b002d1cb8e1f998a4afa2c73e (patch)
treef77e0efb753c16297df47d825ad1d0bf829320ec /e2fsprogs
parent41f677ec5daccaeae616a0bbf508d2a2d54bdac7 (diff)
*: use safe_waitpid() or wait_any_nohang() where approppriate
function old new delta crond_main 1227 1237 +10 init_main 804 794 -10 wait_one 263 252 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 10/-21) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/fsck.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index fd4ea737c..f7e93497d 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -423,13 +423,11 @@ static int wait_one(int flags)
/* if (G.noexecute) { already returned -1; } */
while (1) {
- pid = waitpid(-1, &status, flags);
+ pid = safe_waitpid(-1, &status, flags);
kill_all_if_got_signal();
if (pid == 0) /* flags == WNOHANG and no children exited */
return -1;
if (pid < 0) {
- if (errno == EINTR)
- continue;
if (errno == ECHILD) { /* paranoia */
bb_simple_error_msg("wait: no more children");
return -1;