mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +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
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0484d65581
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-03-04 (Fri, 04 Mar 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -4498,9 +4498,11 @@ void sighandler (int signum)
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
setDebugLevel(DEBUG_NORMAL);
|
setDebugLevel(DEBUG_NORMAL);
|
||||||
signal(SIGTERM, sighandler);
|
signal(SIGTERM, sighandler); // TODO: consider the following
|
||||||
signal(SIGINT, sighandler);
|
signal(SIGINT, sighandler); // NOTES: The effects of signal() in a multithreaded
|
||||||
signal(SIGHUP, SIG_IGN);
|
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++)
|
for(int i = 3; i < 256; i++)
|
||||||
close(i);
|
close(i);
|
||||||
|
Reference in New Issue
Block a user