diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-09-04 11:06:15 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-09-04 20:16:48 +1000 |
commit | 73932a3aa40bb4b2c2bd22f1be3abc546ab83481 (patch) | |
tree | b4e171e67cb18d57883da28ecfd2c59c7aafc589 /file_server/file_server.c | |
parent | 8d3e193fa153eb0c219953707db5ac4cb93cc853 (diff) | |
download | samba-73932a3aa40bb4b2c2bd22f1be3abc546ab83481.tar.gz |
file_server: Run task_server_terminate when smbd exists
This will help us shut down when smbd cannot bind to ports or perform
some other critical startup operation.
Based on a patch by Stefan Metzmacher <metze@samba.org>
Andrew Bartlett
Diffstat (limited to 'file_server/file_server.c')
-rw-r--r-- | file_server/file_server.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/file_server/file_server.c b/file_server/file_server.c index 7c8517e46f9..091432f02b0 100644 --- a/file_server/file_server.c +++ b/file_server/file_server.c @@ -78,6 +78,9 @@ static const char *generate_smb_conf(struct task_server *task) */ static void file_server_smbd_done(struct tevent_req *subreq) { + struct task_server *task = + tevent_req_callback_data(subreq, + struct task_server); int sys_errno; int ret; @@ -87,6 +90,7 @@ static void file_server_smbd_done(struct tevent_req *subreq) } else { DEBUG(0,("file_server smbd daemon exited normally\n")); } + task_server_terminate(task, "smbd child process exited", true); } |