Re: pfstatd crash?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <misc@...>
Date: Wednesday, March 26, 2008 - 2:05 pm

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);

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
pfstatd crash?, clifford bailey, (Wed Mar 26, 10:01 am)
Re: pfstatd crash?, Daniel Hartmeier, (Wed Mar 26, 2:05 pm)
Re: pfstatd crash?, clifford bailey, (Thu Mar 27, 4:43 am)
Re: pfstatd crash?, Egbert Krook, (Thu Mar 27, 10:30 pm)