From: Stefan Metzmacher Date: Thu, 22 Mar 2018 11:32:15 +0000 (+0100) Subject: s3:util: remove reinit_after_fork_pipe_handler before sending SIGTERM X-Git-Tag: ldb-1.4.0~538 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4d2eedafe333395d2fc1ce90fee5d63b11c6036;p=thirdparty%2Fsamba.git s3:util: remove reinit_after_fork_pipe_handler before sending SIGTERM We should not keep the tevent_fd active when we sending us a SIGTERM, this is not a real problem, but due to a different bug I triggered a 100% cpu loop. I think it's safer to idle in that case instead of waisting a lot of energy. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/util.c b/source3/lib/util.c index 5f786f95d3e..394fa5fd191 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -438,6 +438,7 @@ static void reinit_after_fork_pipe_handler(struct tevent_context *ev, * we have reached EOF on stdin, which means the * parent has exited. Shutdown the server */ + TALLOC_FREE(fde); (void)kill(getpid(), SIGTERM); } }