Don't use sigignore (only added recently to 1.6-current. Use sigaction to

ignore SIG_PIPE
This commit is contained in:
jmc 2003-03-31 02:58:03 +00:00
parent a03d2b767f
commit 85ef4da0c0
2 changed files with 28 additions and 1 deletions

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.5 2003/03/04 14:36:17 wiz Exp $
$NetBSD: distinfo,v 1.6 2003/03/31 02:58:03 jmc Exp $
SHA1 (pan-0.13.4.tar.bz2) = d8e13268f89723796bfd36b07cce6b14ee81c724
Size (pan-0.13.4.tar.bz2) = 1639281 bytes
SHA1 (patch-ag) = 4ba365c425f5f754346465d857178331ab47e307
SHA1 (patch-ah) = 0d383f75c7f6f9ab8413cad65461362db66b57c3

View file

@ -0,0 +1,26 @@
$NetBSD: patch-ah,v 1.1 2003/03/31 02:58:03 jmc Exp $
--- pan/sockets.c.orig Wed Feb 12 19:37:43 2003
+++ pan/sockets.c Sun Mar 30 21:33:25 2003
@@ -86,6 +86,9 @@
int port)
{
PanSocket * sock;
+# ifdef SIGPIPE
+ struct sigaction sig;
+# endif
/* sanity clause */
g_return_val_if_fail (is_nonempty_string (server_name), NULL);
@@ -94,7 +97,10 @@
/* needed on Unix */
# ifdef SIGPIPE
- sigignore (SIGPIPE);
+ sig.sa_handler = SIG_IGN;
+ sig.sa_flags = 0;
+ sigprocmask(0, NULL, &sig.sa_mask);
+ sigaction(SIGPIPE, &sig, NULL);
# endif
/* create the socket */