When the process tries to write to the socket after the connection has
been closed, it gets a SIGPIPE signal. Without custom signal handling,
the default action is to terminate the process, see signal(3).
signal(3).Basic socket programming issue, the author sucks. Try the patch below ;)
Daniel
Index: pfstatd.c
===================================================================
RCS file: /var/cvs/pfstat/pfstatd/pfstatd.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pfstatd.c
--- pfstatd.c 11 Jan 2007 16:01:58 -0000 1.1.1.1
+++ pfstatd.c 26 Mar 2008 17:58:05 -0000
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -97,6 +98,7 @@
}
if (argc != optind)
usage();
+ signal(SIGPIPE, SIG_IGN);
if ((fdp = open("/dev/pf", O_RDONLY)) < 0) {
fprintf(stderr, "open: /dev/pf: %s\n", strerror(errno));
return (1);
| Greg Kroah-Hartman | [PATCH 012/196] nozomi driver |
| Ingo Molnar | Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 |
| Rafael J. Wysocki | [PATCH -mm 5/6] Freezer: Remove PF_NOFREEZE from bluetooth threads |
| Ingo Molnar | Re: [PATCH 00/23] per device dirty throttling -v8 |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
