]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
src/tlsproxy.c: Ignore SIGPIPEs.
authorSimon Ruderich <simon@ruderich.org>
Tue, 8 Mar 2011 02:17:14 +0000 (03:17 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 8 Mar 2011 02:17:14 +0000 (03:17 +0100)
src/tlsproxy.c

index fae5c20f3657e96bb40dd158911e95f915b92daf..2a35eaefc6b45e3d4e6b35a62c32d5a8407a8aac 100644 (file)
@@ -86,6 +86,9 @@ int main(int argc, char **argv) {
     action.sa_handler = sigint_handler;
     action.sa_flags   = 0;
     sigaction(SIGINT, &action, NULL);
+    /* Ignore SIGPIPEs. */
+    action.sa_handler = SIG_IGN;
+    sigaction(SIGPIPE, &action, NULL);
 
     /* Initialize ring buffer. */
     ringbuffer_read  = 0;