After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 105890 - Return of the SIGPIPE error
Return of the SIGPIPE error
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.13.4 betas
Other Linux
: Normal critical
: 0.13.4
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2003-02-12 17:19 UTC by Charles Kerr
Modified: 2006-06-18 05:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Kerr 2003-02-12 17:19:23 UTC
When making the jump to GNet, all the unix-specific code was taken out
of pan/sockets.c.  Unfortunately this included the SIGPIPE handling,
so pan can crash again with an uhnandled SIGPIPE when giochannel
flushes its write buffer.

Reported by Brian Morrison.
Comment 1 Charles Kerr 2003-02-12 17:20:33 UTC
This patch should compile on unix & windows:

> --- sockets.c   3 Feb 2003 23:43:18 -0000       1.110
> +++ sockets.c   12 Feb 2003 05:33:12 -0000
> @@ -25,6 +25,7 @@
>
>  #include <errno.h>
>  #include <string.h>
> +#include <signal.h> /* for sigignore(SIGPIPE) on unix */
>  #include <unistd.h>
>
>  #include <glib.h>
> @@ -90,6 +91,11 @@
>         g_return_val_if_fail (is_nonempty_string (server_name), NULL);
>         g_return_val_if_fail (is_nonempty_string (server_address),
>         NULL); g_return_val_if_fail (port>=0, NULL);
> +
> +       /* needed on Unix */
> +#      ifdef SIGPIPE
> +       sigignore (SIGPIPE);
> +#      endif
>
>         /* create the socket */