When the select loop returns and dss is about to terminate, it sends
SIGTERM to any running rm or rsync processes and exits. It does not
wait for these processes to die, however. This is trivial to implement,
and it makes life easier for shutdown scripts which like to proceed
with unmounting file systems.
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);