summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorfredvx <48496214+fredvx@users.noreply.github.com>2020-04-22 14:24:50 -0400
committerFred Herard <fred.herard@oracle.com>2020-04-24 18:39:53 -0400
commit71e4ce5e7722dde25751025cac0e8b29d8d540df (patch)
tree2f4f0e8bd940342b09f7e8c8cf464fa03fda0f97 /usr
parentf6a8d1abaf22c7ee8d23c92e95b73d6f3d143bd6 (diff)
downloadopen-iscsi-71e4ce5e7722dde25751025cac0e8b29d8d540df.tar.gz
Fix SIGPIPE loop in signal handler
Diffstat (limited to 'usr')
-rw-r--r--usr/iscsid.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/iscsid.c b/usr/iscsid.c
index 99d27ab..e501498 100644
--- a/usr/iscsid.c
+++ b/usr/iscsid.c
@@ -310,7 +310,12 @@ static void iscsid_shutdown(void)
static void catch_signal(int signo)
{
- log_debug(1, "pid %d caught signal %d", getpid(), signo);
+ /*
+ * Do not try to call log_debug() if there is a PIPE error
+ * because we can get caught in a PIPE error loop.
+ */
+ if (signo != SIGPIPE)
+ log_debug(1, "pid %d caught signal %d", getpid(), signo);
/* In foreground mode, treat SIGINT like SIGTERM */
if (!daemonize && signo == SIGINT)