]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Restart notifyd
authorVolker Lendecke <vl@samba.org>
Fri, 24 Jun 2016 14:29:28 +0000 (16:29 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 20 Jul 2016 03:21:07 +0000 (05:21 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/server.c

index 8875bcdb16c00542b8813519faa4a85978c6e459..27cf770e1700ba94c0fcb208a0a2ca56aca70f45 100644 (file)
@@ -595,6 +595,18 @@ static void remove_child_pid(struct smbd_parent_context *parent,
                return;
        }
 
+       if (pid == procid_to_pid(&parent->notifyd)) {
+               bool ok;
+
+               DBG_WARNING("Restarting notifyd\n");
+               ok = smbd_notifyd_init(parent->msg_ctx, false,
+                                      &parent->notifyd);
+               if (!ok) {
+                       DBG_ERR("Failed to restart notifyd\n");
+               }
+               return;
+       }
+
        iov[0] = (struct iovec) { .iov_base = (uint8_t *)&pid,
                                  .iov_len = sizeof(pid) };
        iov[1] = (struct iovec) { .iov_base = (uint8_t *)&unclean_shutdown,