notifyd_send() is called as part of smbd initialization both in normal daemon
mode after a fork, but also in interactive mode. In interactive mode, notifyd
should not modify the global signal state with BlockSignals(). This patch moves
the signal blocking to the place where we know that notifyd is a child daemon.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 20 09:04:00 CEST 2016 on sn-devel-144
return tevent_req_post(req, ev);
}
- /* Block those signals that we are not handling */
- BlockSignals(True, SIGHUP);
- BlockSignals(True, SIGUSR1);
-
if (ctdbd_conn == NULL) {
/*
* No cluster around, skip the database replication
}
tevent_req_set_callback(req, notifyd_stopped, msg);
+ /* Block those signals that we are not handling */
+ BlockSignals(True, SIGHUP);
+ BlockSignals(True, SIGUSR1);
+
messaging_send(msg, pid_to_procid(getppid()), MSG_SMB_NOTIFY_STARTED,
NULL);