Skip to content

Commit

Permalink
src/haveged.c - only warn when creating of named semaphore fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Jirka Hladky committed Oct 13, 2024
1 parent 0ef7dd9 commit 6b30426
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/haveged.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,11 @@ int main(int argc, char **argv)
fprintf(stderr, "%s: disabling command mode for this instance\n", params->daemon);
}
}
/* Initilize named semaphore to synchronize command isntances */
/* Initilize named semaphore to synchronize command instances */
sem = sem_open(SEM_NAME, O_CREAT, 0644, 1);
if (sem == NULL) {
error_exit("Couldn't create nammed semaphore " SEM_NAME" error: %s", strerror(errno));
fprintf(stderr, "Warning: Couldn't create named semaphore " SEM_NAME" error: %s", strerror(errno));
fprintf(stderr, " %s: disabling command mode for this instance\n", params->daemon);
}
}
#endif
Expand Down

0 comments on commit 6b30426

Please sign in to comment.