summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/spoolssd.c3
-rw-r--r--source3/rpc_server/epmd.c3
-rw-r--r--source3/rpc_server/lsasd.c3
-rw-r--r--source3/smbd/server.c12
4 files changed, 2 insertions, 19 deletions
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index 9a5d1b0fef..5775505160 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -660,9 +660,6 @@ pid_t start_spoolssd(struct tevent_context *ev_ctx,
return pid;
}
- /* child */
- close_low_fds(false);
-
status = reinit_after_fork(msg_ctx,
ev_ctx,
true);
diff --git a/source3/rpc_server/epmd.c b/source3/rpc_server/epmd.c
index 0d5e6ec6af..c28d8574c0 100644
--- a/source3/rpc_server/epmd.c
+++ b/source3/rpc_server/epmd.c
@@ -159,9 +159,6 @@ void start_epmd(struct tevent_context *ev_ctx,
return;
}
- /* child */
- close_low_fds(false);
-
status = reinit_after_fork(msg_ctx,
ev_ctx,
true);
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c
index 575b863976..416a3b3c13 100644
--- a/source3/rpc_server/lsasd.c
+++ b/source3/rpc_server/lsasd.c
@@ -875,9 +875,6 @@ void start_lsasd(struct tevent_context *ev_ctx,
return;
}
- /* child */
- close_low_fds(false);
-
/* save the parent process id so the children can use it later */
parent_id = procid_self();
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 0fb7d16ef6..cab23bc6d5 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -504,12 +504,6 @@ static void smbd_accept_connection(struct tevent_context *ev,
* them, counting worker smbds. */
CatchChild();
- /* close our standard file
- descriptors */
- if (!debug_get_output_is_stdout()) {
- close_low_fds(False); /* Don't close stderr */
- }
-
status = reinit_after_fork(msg_ctx,
ev,
true);
@@ -1397,10 +1391,8 @@ extern void build_options(bool screen);
goes away */
smbd_server_conn->sock = dup(0);
- /* close our standard file descriptors */
- if (!debug_get_output_is_stdout()) {
- close_low_fds(False); /* Don't close stderr */
- }
+ /* close stdin, stdout (if not logging to it), but not stderr */
+ close_low_fds(true, !debug_get_output_is_stdout(), false);
#ifdef HAVE_ATEXIT
atexit(killkids);