diff options
author | Tom Gundersen <teg@jklm.no> | 2015-04-24 17:50:49 +0200 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-05-03 15:27:40 -0400 |
commit | 29af2fd71d66c574b4d5d9b9249c854ced30676b (patch) | |
tree | 82fe575fc5e0a40311ec1d8b72fa3d9d0f4d2f7a | |
parent | 31151da3c4ae7f5331559f6de37b8c77d9acea3e (diff) |
udevd: improve logging in SIGCHLD handling
Remove some redundant logging, and reduce the log-level in most cases. The only
case that is really critical is if a worker failed while hanlding an event, so
keep that at error level.
-rw-r--r-- | src/udev/udevd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 4a9944d494..97e8fa9e4b 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -864,21 +864,21 @@ static void handle_signal(struct udev *udev, int signo) { if (worker->pid != pid) continue; - log_debug("worker ["PID_FMT"] exit", pid); if (WIFEXITED(status)) { - if (WEXITSTATUS(status) != 0) - log_error("worker ["PID_FMT"] exit with return code %i", - pid, WEXITSTATUS(status)); + if (WEXITSTATUS(status) == 0) + log_debug("worker ["PID_FMT"] exited", pid); + else + log_warning("worker ["PID_FMT"] exited with return code %i", pid, WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { - log_error("worker ["PID_FMT"] terminated by signal %i (%s)", - pid, WTERMSIG(status), strsignal(WTERMSIG(status))); + log_warning("worker ["PID_FMT"] terminated by signal %i (%s)", + pid, WTERMSIG(status), strsignal(WTERMSIG(status))); } else if (WIFSTOPPED(status)) { - log_error("worker ["PID_FMT"] stopped", pid); + log_info("worker ["PID_FMT"] stopped", pid); } else if (WIFCONTINUED(status)) { - log_error("worker ["PID_FMT"] continued", pid); + log_info("worker ["PID_FMT"] continued", pid); } else { - log_error("worker ["PID_FMT"] exit with status 0x%04x", pid, status); + log_warning("worker ["PID_FMT"] exit with status 0x%04x", pid, status); } if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { |