Skip to content

Commit

Permalink
file_server: Run task_server_terminate when smbd exists
Browse files Browse the repository at this point in the history
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 <[email protected]>

Andrew Bartlett
  • Loading branch information
abartlet committed Sep 4, 2012
1 parent 8d3e193 commit 73932a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions file_server/file_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}


Expand Down

0 comments on commit 73932a3

Please sign in to comment.