]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-program-client: Remove drop_stderr parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 12 Aug 2024 09:12:04 +0000 (12:12 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:39:59 +0000 (10:39 +0200)
This isn't used by any callers, and it doesn't seem very useful.

src/lib-program-client/program-client-local.c
src/lib-program-client/program-client.h

index 3bb0b69cd60cbb88d6855e7229d01643e4ba21fd..648269dbb70aff1e054363e431505bc2cc76b3c0 100644 (file)
@@ -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();
        }
 
index d424c27425e90739323f9eb740d7943463cc15da..9090ebf16f8c0485217382c36385ca7ecf95c2cc 100644 (file)
@@ -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