aboutsummaryrefslogtreecommitdiff
path: root/src/stable/sockettcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/sockettcp.h')
-rw-r--r--src/stable/sockettcp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stable/sockettcp.h b/src/stable/sockettcp.h
index 3fc14ef..8539b52 100644
--- a/src/stable/sockettcp.h
+++ b/src/stable/sockettcp.h
@@ -48,7 +48,14 @@ namespace Bu
48 ... 48 ...
49 ... 49 ...
50 ... 50 ...
51 // sigset is deprecated
51 sigset( SIGPIPE, SIG_IGN ); // do this before you use a Bu::SocketTcp 52 sigset( SIGPIPE, SIG_IGN ); // do this before you use a Bu::SocketTcp
53
54 // this is the modern Linux alternative
55 struct sigaction saIgnore;
56 memset( &saIgnore, 0, sizeof(struct sigaction) );
57 saIgnore.sa_handler = SIG_IGN;
58 sigaction( SIGPIPE, &saIgnore, NULL );
52 @endcode 59 @endcode
53 * When this is done, Bu::SocketTcp will simply throw a broken pipe 60 * When this is done, Bu::SocketTcp will simply throw a broken pipe
54 * exception just like every other error condition, allowing your program 61 * exception just like every other error condition, allowing your program