diff options
author | Bill Nottingham <notting@redhat.com> | 1999-02-04 19:11:11 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-02-04 19:11:11 +0000 |
commit | ae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c (patch) | |
tree | 3c12193fed2a085b512af8cc30d7865adfb10186 /src/process.c | |
parent | e8d2f95c03d1df94ca6ab9bab11f0f1d8e8c5893 (diff) | |
download | initscripts-ae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c.tar initscripts-ae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c.tar.gz initscripts-ae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c.tar.bz2 initscripts-ae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c.tar.xz initscripts-ae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c.zip |
fixes
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 860d9452..739e8089 100644 --- a/src/process.c +++ b/src/process.c @@ -115,7 +115,7 @@ int monitor(char *cmdname, int pid, int numfds, int *fds, int reexec, int quiet) } while (!done) { - if ((x=poll(pfds,numfds,500))==-1) { + if (((x=poll(pfds,numfds,500))==-1)&&errno!=EINTR) { perror("poll"); return -1; } @@ -164,11 +164,7 @@ int monitor(char *cmdname, int pid, int numfds, int *fds, int reexec, int quiet) y++; } } - rc = rc>>8; - - if (!rc) - return 0; - else { + if ((!WIFEXITED(rc)) || (rc=WEXITSTATUS(rc))) { /* If there was an error and we're quiet, be loud */ int x; @@ -183,6 +179,7 @@ int monitor(char *cmdname, int pid, int numfds, int *fds, int reexec, int quiet) } return (rc); } + return 0; } int runCommand(char *cmd, int reexec, int quiet) { |