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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user