]> git.tuebingen.mpg.de Git - dss.git/blobdiff - dss.c
run: Wait for children to die.
[dss.git] / dss.c
diff --git a/dss.c b/dss.c
index 3e626ab0113b1890277da115ea6c735dbdb690d7..e9bd56a5e883f3f9aa2ee0ef4bf463dce9f2c7ba 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -1565,6 +1565,8 @@ static int com_run(void)
                ret = -E_BUG;
        kill_children();
        exit_hook(ret);
+       while (wait(NULL) >= 0 || errno != ECHILD)
+               ; /* still have children to wait for */
        return ret;
 }
 EXPORT_CMD_HANDLER(run);