diff -up ./rngd_jitter.c.message ./rngd_jitter.c --- ./rngd_jitter.c.message 2019-12-02 11:41:40.456723553 -0500 +++ ./rngd_jitter.c 2019-12-02 11:43:09.331427470 -0500 @@ -302,15 +302,11 @@ static void *thread_entropy_task(void *d while(written != me->buf_sz) { message(LOG_DAEMON|LOG_DEBUG, "Writing to pipe\n"); ret = write(me->pipe_fd, &tmpbuf[written], me->buf_sz - written); + if ((ret < 0) && (errno != EBADF)) + message(LOG_DAEMON|LOG_WARNING, "Error on pipe write: %s\n", strerror(errno)); message(LOG_DAEMON|LOG_DEBUG, "DONE Writing to pipe with return %ld\n", ret); if (first) me->active = 1; - /* - * suppress EBADF errors, as those indicate the pipe is - * closed and we are exiting - */ - if ((ret < 0) && (errno != EBADF)) - message(LOG_DAEMON|LOG_WARNING, "Error on pipe write: %s\n", strerror(errno)); if (!first && !me->active) break; first = 0;