From: Juergen Perlinger Date: Sat, 7 Apr 2018 11:54:34 +0000 (+0200) Subject: [Bug 3432] - refclocks that 'write()' should check the result X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9fda1020e635c07a72cf95ea70c25f034959022;p=thirdparty%2Fntp.git [Bug 3432] - refclocks that 'write()' should check the result - sidekick: unchecked write in async resover code bk: 5ac8b17a-FbQY-zAHyPdx0RfVfvsrQ --- diff --git a/libntp/work_thread.c b/libntp/work_thread.c index 433290c4c..41a8e6e96 100644 --- a/libntp/work_thread.c +++ b/libntp/work_thread.c @@ -373,8 +373,10 @@ send_blocking_resp_internal( /* queue consumer wake-up notification */ if (empty) { -# ifdef WORK_PIPE - write(c->resp_write_pipe, "", 1); +# ifdef WORK_PIPE + if (1 != write(c->resp_write_pipe, "", 1)) + msyslog(LOG_ERR, "%s", + "async resolver notifation failed"); # else tickle_sem(c->responses_pending); # endif