diff options
author | Volker Lendecke <vl@samba.org> | 2016-06-21 14:13:06 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-07-20 05:21:07 +0200 |
commit | 5371d2b86077a0624e3ee58d4f554d64ce5cfbe9 (patch) | |
tree | bce271893220bf17ce1b8f4d1c5a0c83fac96df6 /source3 | |
parent | 7404feffd7130ce389be3a1f65a7ae8c7cc2d156 (diff) | |
download | samba-5371d2b86077a0624e3ee58d4f554d64ce5cfbe9.tar.gz |
smbd: Remember notifyd's serverid
Similarly to cleanupd, this is necessary to restart notifyd
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/server.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 07eca5135e4..8875bcdb16c 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -73,6 +73,7 @@ struct smbd_parent_context { size_t num_children; struct server_id cleanupd; + struct server_id notifyd; struct tevent_timer *cleanup_te; }; @@ -374,7 +375,8 @@ static void notifyd_stopped(struct tevent_req *req) DEBUG(1, ("notifyd stopped: %s\n", strerror(ret))); } -static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive) +static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive, + struct server_id *ppid) { struct tevent_context *ev = messaging_tevent_context(msg); struct tevent_req *req; @@ -394,6 +396,10 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive) } if (pid != 0) { + if (am_parent != 0) { + add_child_pid(am_parent, pid); + } + *ppid = pid_to_procid(pid); return true; } @@ -1600,7 +1606,7 @@ extern void build_options(bool screen); exit_daemon("Samba cannot init leases", EACCES); } - if (!smbd_notifyd_init(msg_ctx, interactive)) { + if (!smbd_notifyd_init(msg_ctx, interactive, &parent->notifyd)) { exit_daemon("Samba cannot init notification", EACCES); } |