diff --git a/CHANGELOG.md b/CHANGELOG.md index 70c8f94f..baf2da92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,13 +51,17 @@ Users may have to change how they access the system ### Minor features +* Backend ignore of SIGPIPE. This occurs if client quits unexpectedly over the UNIX socket. + * This is a timing issue but occurs more frequently in large RESTCONF messgaes. * New `clixon-config@2022-02-11.yang` revision * Added option: `CLICON_LOG_STRING_LIMIT` * Limit the length of log and debug messages. Some log messages are dependendent on sizes that can be very large, such as packet lengths. This new option constrains the length of all messgaes. By default no limits. - ### Corrected Bugs + + + * Fixed: input RPC validation of choice (non-case) * Fixed: More than one unknown/extension in combination with augment of extension resulted in extension being skipped. diff --git a/apps/backend/backend_main.c b/apps/backend/backend_main.c index 065dd696..611e0eec 100644 --- a/apps/backend/backend_main.c +++ b/apps/backend/backend_main.c @@ -1021,6 +1021,11 @@ main(int argc, clicon_err(OE_DAEMON, errno, "Setting signal"); goto done; } + /* Client exit in the middle of a transaction, handled in clicon_msg_send */ + if (set_signal(SIGPIPE, SIG_IGN, NULL) < 0){ + clicon_err(OE_DAEMON, errno, "Setting signal"); + goto done; + } /* Initialize server socket and save it to handle */ if ((ss = backend_server_socket(h)) < 0) goto done; diff --git a/lib/src/clixon_proto.c b/lib/src/clixon_proto.c index 8be2fb98..6744a87f 100644 --- a/lib/src/clixon_proto.c +++ b/lib/src/clixon_proto.c @@ -278,6 +278,8 @@ atomicio(ssize_t (*fn) (int, void *, size_t), continue; else if (errno == ECONNRESET)/* Connection reset by peer */ res = 0; + else if (errno == EPIPE) /* Client shutdown */ + res = 0; /* SIGPIPE if client is killed */ case 0: /* fall thru */ return (res);