Added curly brackets around the record_pid() check which
stop sm-notify from exiting when a pid file does not
exist.
Signed-off-by: Steve Dickson <steved@redhat.com>
openlog("sm-notify", LOG_PID, LOG_DAEMON);
if (strcmp(_SM_BASE_PATH, BASEDIR) == 0) {
- if (record_pid() == 0 && force == 0 && opt_update_state == 1)
+ if (record_pid() == 0 && force == 0 && opt_update_state == 1) {
/* already run, don't try again */
nsm_log(LOG_NOTICE, "Already notifying clients; Exiting!");
exit(0);
+ }
}
if (opt_srcaddr) {