From ffe884c8db7a3e2c9a3844b55b8075be476a48a8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 22 Mar 2012 14:23:11 +0100 Subject: s3: Fix smbd -i Autobuild-User: Volker Lendecke Autobuild-Date: Thu Mar 22 18:40:02 CET 2012 on sn-devel-104 --- source3/smbd/server.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'source3/smbd/server.c') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 9cc88d4d1a..ef3f140f78 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1231,15 +1231,17 @@ extern void build_options(bool screen); exit(1); } - /* - * Do not initialize the parent-child-pipe before becoming - * a daemon: this is used to detect a died parent in the child - * process. - */ - status = init_before_fork(); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("init_before_fork failed: %s\n", nt_errstr(status))); - exit(1); + if (!interactive) { + /* + * Do not initialize the parent-child-pipe before becoming a + * daemon: this is used to detect a died parent in the child + * process. + */ + status = init_before_fork(); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("init_before_fork failed: %s\n", nt_errstr(status))); + exit(1); + } } smbd_server_conn->msg_ctx = msg_ctx; -- cgit