From 28050dab7206127a7805c6d128c8cd6a91295f9e Mon Sep 17 00:00:00 2001 From: kojima Date: Mon, 18 Oct 2004 00:22:22 +0000 Subject: [PATCH] fixed a restart bug when child processes exit --- src/monitor.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/monitor.c b/src/monitor.c index c7a49266..ca83a914 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -118,14 +118,13 @@ int MonitorLoop(int argc, char **argv) exit(1); } - if ((exited=waitpid(-1, &status, 0)) < 0) - { - wsyserror(_("Error during monitoring of Window Maker process.")); - break; - } - - if (exited != pid) - continue; + do { + if ((exited=waitpid(-1, &status, 0)) < 0) + { + wsyserror(_("Error during monitoring of Window Maker process.")); + break; + } + } while (exited != pid); child_argv[argc]= "--for-real-";