diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/decode.c | 8 | ||||
-rw-r--r-- | src/directory.c | 14 | ||||
-rw-r--r-- | src/player.c | 4 | ||||
-rw-r--r-- | src/sig_handlers.c | 2 |
4 files changed, 18 insertions, 10 deletions
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); } } diff --git a/src/directory.c b/src/directory.c index 560c04b7b..3abf22c74 100644 --- a/src/directory.c +++ b/src/directory.c @@ -130,20 +130,22 @@ void directory_sigChldHandler(int pid, int status) { if (directory_updatePid == pid) { if (WIFSIGNALED(status) && WTERMSIG(status) != SIGTERM) { - ERROR("update process died from a " - "non-TERM signal: %i\n", WTERMSIG(status)); + /* ERROR("update process died from a " + "non-TERM signal: %i\n", WTERMSIG(status)); */ } else if (!WIFSIGNALED(status)) { switch (WEXITSTATUS(status)) { case DIRECTORY_UPDATE_EXIT_UPDATE: directory_reReadDB = 1; - DEBUG("directory_sigChldHandler: " - "updated db\n"); + /* DEBUG("directory_sigChldHandler: " + "updated db\n"); */ case DIRECTORY_UPDATE_EXIT_NOUPDATE: - DEBUG("directory_sigChldHandler: " - "update exited succesffully\n"); + /* DEBUG("directory_sigChldHandler: " + "update exited succesffully\n"); */ break; + /* default: ERROR("error updating db\n"); + */ } } clearUpdatePid(); diff --git a/src/player.c b/src/player.c index 7c92d088e..6d9f1e693 100644 --- a/src/player.c +++ b/src/player.c @@ -85,6 +85,7 @@ void player_sigChldHandler(int pid, int status) { if (player_pid == pid) { + /* DEBUG("SIGCHLD caused by player process\n"); if (WIFSIGNALED(status) && WTERMSIG(status) != SIGTERM && @@ -93,17 +94,20 @@ void player_sigChldHandler(int pid, int status) ERROR("player process died from signal: %i\n", WTERMSIG(status)); } + */ resetPlayer(); } else if (pid == getPlayerData()->playerControl.decode_pid && player_pid <= 0) { + /* if (WIFSIGNALED(status) && WTERMSIG(status) != SIGTERM) { ERROR("(caught by master parent) " "decode process died from a " "non-TERM signal: %i\n", WTERMSIG(status)); } + */ getPlayerData()->playerControl.decode_pid = 0; } } diff --git a/src/sig_handlers.c b/src/sig_handlers.c index fc29d2522..e092f51e7 100644 --- a/src/sig_handlers.c +++ b/src/sig_handlers.c @@ -62,7 +62,7 @@ static void chldSigHandler(int signal) { int status; int pid; - DEBUG("main process got SIGCHLD\n"); + /* DEBUG("main process got SIGCHLD\n"); */ while (0 != (pid = wait3(&status, WNOHANG, NULL))) { if (pid < 0) { if (errno == EINTR) |