From: Timo Sirainen Date: Mon, 12 Aug 2024 09:12:04 +0000 (+0300) Subject: lib-program-client: Remove drop_stderr parameter X-Git-Tag: 2.4.1~709 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa3f0b450defaee5e08290245f55ba0e163f3c5c;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: Remove drop_stderr parameter This isn't used by any callers, and it doesn't seem very useful. --- diff --git a/src/lib-program-client/program-client-local.c b/src/lib-program-client/program-client-local.c index 3bb0b69cd6..648269dbb7 100644 --- a/src/lib-program-client/program-client-local.c +++ b/src/lib-program-client/program-client-local.c @@ -49,7 +49,7 @@ program_client_local_exited(struct program_client_local *plclient); static void exec_child(const char *bin_path, const char *const *args, ARRAY_TYPE(const_string) *envs, int in_fd, int out_fd, - int *extra_fds, bool drop_stderr, struct event *event) + int *extra_fds, struct event *event) { ARRAY_TYPE(const_string) exec_args; @@ -71,14 +71,6 @@ exec_child(const char *bin_path, const char *const *args, (out_fd != in_fd) && close(out_fd) < 0) e_error(event, "close(out_fd) failed: %m"); - /* Drop stderr if requested */ - if (drop_stderr) { - if (dup2(dev_null_fd, STDERR_FILENO) < 0) { - i_fatal("program %s: " - "dup2(stderr) failed: %m", bin_path); - } - } - /* Setup extra fds */ if (extra_fds != NULL) { int *efd; @@ -263,8 +255,7 @@ program_client_local_connect(struct program_client *pclient) pclient->params.home); exec_child(plclient->bin_path, pclient->args, &pclient->envs, - fd_in[0], fd_out[1], child_extra_fds, - pclient->params.drop_stderr, event); + fd_in[0], fd_out[1], child_extra_fds, event); i_unreached(); } diff --git a/src/lib-program-client/program-client.h b/src/lib-program-client/program-client.h index d424c27425..9090ebf16f 100644 --- a/src/lib-program-client/program-client.h +++ b/src/lib-program-client/program-client.h @@ -26,7 +26,6 @@ struct program_client_parameters { struct event *event; bool allow_root:1; - bool drop_stderr:1; /* use o_stream_dot, which is mainly useful to make sure that an unexpectedly closed connection doesn't cause the partial input to be accepted as valid and complete program input. This is always