author | Olivier Brunel
<jjk@jjacky.com> 2015-03-01 12:55:16 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2015-04-04 12:47:36 UTC |
parent | 06bf8436cd12f5e16e2e0b2b86d12a31a9d27ad1 |
src/anopa/start-stop.c | +10 | -4 |
diff --git a/src/anopa/start-stop.c b/src/anopa/start-stop.c index 81b3af8..9eb052e 100644 --- a/src/anopa/start-stop.c +++ b/src/anopa/start-stop.c @@ -592,7 +592,8 @@ handle_oneshot (int is_start) r = wait_pids_nohang ((pid_t const *) ga_pid.s, genalloc_len (pid_t, &ga_pid), &wstat); if (r < 0) { - strerr_warnwu1sys ("wait_pids_nohang"); + if (errno != ECHILD) + strerr_warnwu1sys ("wait_pids_nohang"); return r; } else if (r == 0) @@ -739,9 +740,14 @@ handle_signals (aa_mode mode) case SIGCHLD: { - int rr = handle_oneshot (mode == AA_MODE_START); - if (rr > 0) - r += rr; + for (;;) + { + int rr = handle_oneshot (mode == AA_MODE_START); + if (rr > 0) + r += rr; + else + break; + } break; }