mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
fix #833. Handle SIGPIPE
This commit is contained in:
parent
6c848a57b6
commit
7637b51ba5
1 changed files with 4 additions and 0 deletions
|
@ -42,6 +42,9 @@ void handle_signal(int sig)
|
||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
Daemon.running = 0; // Exit loop
|
Daemon.running = 0; // Exit loop
|
||||||
break;
|
break;
|
||||||
|
case SIGPIPE:
|
||||||
|
LogPrint(eLogInfo, "SIGPIPE received");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +163,7 @@ namespace i2p
|
||||||
sigaction(SIGABRT, &sa, 0);
|
sigaction(SIGABRT, &sa, 0);
|
||||||
sigaction(SIGTERM, &sa, 0);
|
sigaction(SIGTERM, &sa, 0);
|
||||||
sigaction(SIGINT, &sa, 0);
|
sigaction(SIGINT, &sa, 0);
|
||||||
|
sigaction(SIGPIPE, &sa, 0);
|
||||||
|
|
||||||
return Daemon_Singleton::start();
|
return Daemon_Singleton::start();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue