neutrino: don't crap your pants on SIGPIPE

A SIGPIPE can happen e.g. in streamts.cpp. Dont die, but just ignore
the signal. Should fix bug#375.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1238 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2011-03-04 14:11:21 +00:00
parent 790ec8170c
commit 0484d65581

View File

@@ -4498,9 +4498,11 @@ void sighandler (int signum)
int main(int argc, char **argv)
{
setDebugLevel(DEBUG_NORMAL);
signal(SIGTERM, sighandler);
signal(SIGINT, sighandler);
signal(SIGHUP, SIG_IGN);
signal(SIGTERM, sighandler); // TODO: consider the following
signal(SIGINT, sighandler); // NOTES: The effects of signal() in a multithreaded
signal(SIGHUP, SIG_IGN); // process are unspecified (signal(2))
/* don't die in streamts.cpp from a SIGPIPE if client disconnects */
signal(SIGPIPE, SIG_IGN);
for(int i = 3; i < 256; i++)
close(i);