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':