Mercurial > libpst
diff src/readpst.c @ 259:78e95fab9a8b
add some debug checking for process exit status
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 16 Apr 2011 10:31:32 -0700 |
parents | 8ad8fd1c5451 |
children | 41862bddcf63 |
line wrap: on
line diff
--- a/src/readpst.c Sat Apr 16 10:09:28 2011 -0700 +++ b/src/readpst.c Sat Apr 16 10:31:32 2011 -0700 @@ -161,9 +161,16 @@ pid_t ch = waitpid(child, &status, ((waitall) ? 0 : WNOHANG)); if (ch == child) { // check termination status + //if (WIFEXITED(status)) { + // int ext = WEXITSTATUS(status); + // printf("Process %d exited with status %d\n", child, ext); + // fflush(stdout); + //} if (WIFSIGNALED(status)) { int sig = WTERMSIG(status); DEBUG_INFO(("Process %d terminated with signal %d\n", child, sig)); + //printf("Process %d terminated with signal %d\n", child, sig); + //fflush(stdout); } // this has terminated, remove it from the list for (j=i; j<active_children-1; j++) {