From: Stephan Bosch Date: Mon, 26 Feb 2018 16:12:29 +0000 (+0100) Subject: lib-program-client: local: Stop immediately when child program without I/O ends. X-Git-Tag: 2.3.9~2084 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2de592609e9f32f2ce25203ff79fbcf8465c406c;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: local: Stop immediately when child program without I/O ends. Particularly, don't perform this by calling the input handler. --- diff --git a/src/lib-program-client/program-client-local.c b/src/lib-program-client/program-client-local.c index 8d7ac57aea..150d9ec230 100644 --- a/src/lib-program-client/program-client-local.c +++ b/src/lib-program-client/program-client-local.c @@ -130,16 +130,17 @@ static void program_client_local_waitchild(const struct child_wait_status *status, struct program_client_local *plclient) { + struct program_client *pclient = &plclient->client; + i_assert(plclient->pid == status->pid); plclient->status = status->status; plclient->exited = TRUE; plclient->pid = -1; - if (plclient->stopping) + if (plclient->stopping || + (pclient->fd_in < 0 && pclient->fd_out < 0)) program_client_local_exited(plclient); - else - program_client_program_input(&plclient->client); } static int