From eda485afab60e0f4913ccd8ae7b886d081356b1f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 26 Jan 2008 22:16:46 +0000 Subject: removing debug messages from signal handlers As unfortunate as it is to remove such useful debugging messages, it's necessary to fix a potential deadlock with signal handling. A bunch of functions the debug functions call aren't safe to call from a signal handler. There are some alternate solutions, but they're neither pretty nor simple. So just remove them entirely for now. From: jat, r6828 in trunk git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.13.0-fixes@7160 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/decode.c') diff --git a/src/decode.c b/src/decode.c index 82eba19b9..3efb56e8b 100644 --- a/src/decode.c +++ b/src/decode.c @@ -44,22 +44,24 @@ void decodeSigHandler(int sig, siginfo_t * si, void *v) if (sig == SIGCHLD) { int status; if (decode_pid == wait3(&status, WNOHANG, NULL)) { + /* if (WIFSIGNALED(status)) { if (WTERMSIG(status) != SIGTERM) { ERROR("decode process died from " "signal: %i\n", WTERMSIG(status)); } } + */ decode_pid = 0; getPlayerData()->playerControl.decode_pid = 0; } } else if (sig == SIGTERM) { int pid = decode_pid; if (pid > 0) { - DEBUG("player (or child) got SIGTERM\n"); + /* DEBUG("player (or child) got SIGTERM\n"); */ kill(pid, SIGTERM); - } else - DEBUG("decoder (or child) got SIGTERM\n"); + } /* else + DEBUG("decoder (or child) got SIGTERM\n"); */ exit(EXIT_SUCCESS); } } -- cgit v1.2.3