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. git-svn-id: https://svn.musicpd.org/mpd/trunk@6828 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user