Skip to content
Snippets Groups Projects
Commit ada09301 authored by Moe Jette's avatar Moe Jette
Browse files

Don't exit if problem setting pid file in slurmctld.

Add error test on close of pid file in slurmd.
parent d7907bfd
No related branches found
No related tags found
No related merge requests found
...@@ -180,11 +180,12 @@ main (int argc, char *argv[]) ...@@ -180,11 +180,12 @@ main (int argc, char *argv[])
_msg_engine(); _msg_engine();
/* /*
* Close pidfile, thus releasing write lock and * Close fd here, otherwise we'll deadlock since create_pidfile()
* allowing a waiting to continue. * flocks the pidfile.
*/ */
(void) close(pidfd); /* Ignore errors */ if (pidfd >= 0) /* valid pidfd, non-error */
(void) close(pidfd); /* Ignore errors */
if (unlink(conf->pidfile) < 0) if (unlink(conf->pidfile) < 0)
error("Unable to remove pidfile `%s': %m", conf->pidfile); error("Unable to remove pidfile `%s': %m", conf->pidfile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment