mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 02:46:26 +00:00
lib: fix cosmetic issue with exit race
if we're using --terminal, the daemon may in some cases exit fast enough for the parent to see this; this resulted in a confusing/bogus "failed to start, exited 0" message. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
9eed278b16
commit
6bd2b3608d
@ -641,7 +641,10 @@ static void frr_daemon_wait(int fd)
|
||||
exit(0);
|
||||
|
||||
/* child failed one way or another ... */
|
||||
if (WIFEXITED(exitstat))
|
||||
if (WIFEXITED(exitstat) && WEXITSTATUS(exitstat) == 0)
|
||||
/* can happen in --terminal case if exit is fast enough */
|
||||
(void)0;
|
||||
else if (WIFEXITED(exitstat))
|
||||
fprintf(stderr, "%s failed to start, exited %d\n", di->name,
|
||||
WEXITSTATUS(exitstat));
|
||||
else if (WIFSIGNALED(exitstat))
|
||||
|
Loading…
Reference in New Issue
Block a user