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

Make _sem_open arguments in _shm_reopen() match those in _shm_lock_and_initialize()

parent a7ae6b0b
No related branches found
No related tags found
No related merge requests found
......@@ -924,7 +924,8 @@ _shm_reopen()
{
int retval = SLURM_SUCCESS;
if ((shm_lock = _sem_open(SHM_LOCKNAME, 0)) == SEM_FAILED) {
if ((shm_lock = _sem_open(SHM_LOCKNAME, O_CREAT|O_EXCL, 0600, 0))
== SEM_FAILED) {
if (errno != ENOENT) {
error("Unable to initialize semaphore: %m");
return SLURM_FAILURE;
......@@ -932,7 +933,8 @@ _shm_reopen()
debug("Lockfile found but semaphore deleted: "
"creating new shm segment");
shm_cleanup();
if ((shm_lock = _sem_open(SHM_LOCKNAME, 0)) == SEM_FAILED) {
if ((shm_lock = _sem_open(SHM_LOCKNAME,O_CREAT|O_EXCL,
0600, 0)) == SEM_FAILED) {
error("Unable to initialize semaphore: %m");
return SLURM_FAILURE;
}
......
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