From: Lars Ellenberg <lars.ellenberg@linbit.com>
Ignore SIGPIPE in ietd
Otherwise we would die in some later write() during the event_loop
instead of getting EPIPE!
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@652
d57e44dd-8a1f-0410-8b47-
8ef2f437770f
#include <unistd.h>
#include <getopt.h>
#include <netdb.h>
+#include <signal.h>
#include <sys/poll.h>
#include <sys/socket.h>
exit(-1);
}
+ /*
+ * Otherwise we could die in some later write() during the event_loop()
+ * instead of getting EPIPE!
+ */
+ signal(SIGPIPE, SIG_IGN);
+
while ((ch = getopt_long(argc, argv, "c:fd:s:u:g:a:p:vh", long_options, &longindex)) >= 0) {
switch (ch) {
case 'c':