diff options
-rw-r--r-- | batchd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,7 +13,7 @@ #include <signal.h> #define DEFAULT_QUEUE_DIR "." -#define MAX_JOBS 1 +#define MAX_JOBS 2 int cur_jobs = 0; @@ -74,11 +74,11 @@ wait_all() { for (;;) { int r = waitpid(-1, NULL, WNOHANG); - if (r == -1) { + if (r == 0) + break; + else if (r == -1) { if (errno == ECHILD) break; - else if (errno == EWOULDBLOCK) - break; else err(1, "waitpid()"); } |