summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/smbd/server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index d30bcd6648..3a81e50786 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -213,8 +213,11 @@ static int binary_smbd_main(int argc, const char *argv[])
should hang off that */
event_ctx = event_context_init(NULL);
- /* catch EOF on stdin */
- event_add_fd(event_ctx, event_ctx, 0, EVENT_FD_READ, server_stdin_handler, NULL);
+ if (interactive) {
+ /* catch EOF on stdin */
+ event_add_fd(event_ctx, event_ctx, 0, EVENT_FD_READ,
+ server_stdin_handler, NULL);
+ }
DEBUG(0,("Using %s process model\n", model));
status = server_service_startup(event_ctx, model, lp_server_services());