summaryrefslogtreecommitdiffstats
path: root/sources/ogAdmServer.cpp
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2019-01-11 01:01:32 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-01-17 13:19:02 +0100
commit9fc0037bd74da121a818804ed58a110f0fda5e9f (patch)
tree85ef280958b5d6208fcd30dc01e8f85c62c18f6e /sources/ogAdmServer.cpp
parent162d7808b0233759d9a883bdc54831392f9ea9c7 (diff)
#580 ignore SIGPIPE signal
This signal is received when socket hit connection reset by peer state, which may happen in transient network failures.
Diffstat (limited to 'sources/ogAdmServer.cpp')
-rw-r--r--sources/ogAdmServer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp
index a35f40a..8e24d58 100644
--- a/sources/ogAdmServer.cpp
+++ b/sources/ogAdmServer.cpp
@@ -3654,6 +3654,9 @@ int main(int argc, char *argv[])
int activo=1;
int i;
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ exit(EXIT_FAILURE);
+
openlog("ogAdmServer", LOG_PID, LOG_DAEMON);
/*--------------------------------------------------------------------------------------------------------