X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudev-event.c;h=4af3e08f60e4c20727c7430b7e7cc18916a665ce;hb=a95f038521d31e0158fc4115651d035e7482e1a2;hp=ef21ce8f6b1a5d774309226586fdbd49cf47c56b;hpb=b466e9ab3951207a3c0c8d2ba6167be1eac1e41a;p=elogind.git diff --git a/udev/udev-event.c b/udev/udev-event.c index ef21ce8f6..4af3e08f6 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -660,7 +660,7 @@ static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid) goto out; } if (fdcount == 0) { - err(udev, "timeout: killing '%s'[%u]\n", cmd, pid); + err(udev, "timeout: killing '%s' [%u]\n", cmd, pid); kill(pid, SIGKILL); } @@ -681,14 +681,20 @@ static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid) if (waitpid(pid, &status, WNOHANG) < 0) break; if (WIFEXITED(status)) { - info(udev, "'%s'[%u] returned with exitcode %i\n", cmd, pid, WEXITSTATUS(status)); + info(udev, "'%s' [%u] exit with return code %i\n", cmd, pid, WEXITSTATUS(status)); if (WEXITSTATUS(status) != 0) err = -1; } else if (WIFSIGNALED(status)) { - err(udev, "'%s'[%u] terminated by signal %i\n", cmd, pid, WTERMSIG(status)); + err(udev, "'%s' [%u] terminated by signal %i (%s)\n", cmd, pid, WTERMSIG(status), strsignal(WTERMSIG(status))); + err = -1; + } else if (WIFSTOPPED(status)) { + err(udev, "'%s' [%u] stopped\n", cmd, pid); + err = -1; + } else if (WIFCONTINUED(status)) { + err(udev, "'%s' [%u] continued\n", cmd, pid); err = -1; } else { - err(udev, "'%s'[%u] unexpected exit with status 0x%04x\n", cmd, pid, status); + err(udev, "'%s' [%u] exit with status 0x%04x\n", cmd, pid, status); err = -1; } pid = 0;