From 922c377cd26bb2279ab5c4871f561c64c084c5a3 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 30 Jan 2009 16:41:22 +0000 Subject: [PATCH] Merge with IET r195: From: Lars Ellenberg Ignore SIGPIPE in ietd Otherwise we would die in some later write() during the event_loop instead of getting EPIPE! git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@652 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/iscsi_scstd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index ba2505fa9..d696cc362 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -581,6 +582,12 @@ int main(int argc, char **argv) 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':