mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user