Currently, if para_server gets killed by SIGKILL, its status clients
happily move on and announce the most current stream. This causes
audiod to restart the receivers in an endless loop. It's better to
close the connection from within com_stat() if the parent pid equals
one (which indicates that para_server has crashed).
ret = 1;
if (num == 1)
goto out;
- usleep(500000 * 100);
+ sleep(50);
+ if (getppid() == 1)
+ return -E_SERVER_CRASH;
}
out:
return ret;
PARA_ERROR(BAD_USER, "you don't exist. Go away."), \
PARA_ERROR(LOCK, "lock error"), \
PARA_ERROR(SENDER_CMD, "command not supported by this sender"), \
+ PARA_ERROR(SERVER_CRASH, "para_server crashed -- can not live without it"), \
#define PLAYLIST_SELECTOR_ERRORS \