We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0968d4c + bd852ce commit 3ac7fecCopy full SHA for 3ac7fec
keepalived/core/pidfile.c
@@ -167,7 +167,7 @@ create_pidfile(pidfile_t *pidf)
167
if (umask_val & (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH))
168
umask(umask_val & ~(S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH));
169
170
- while ((pidf->fd = open(pidf->path, O_NOFOLLOW | O_CREAT | O_WRONLY | O_NONBLOCK, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1 && errno == EINTR);
+ while ((pidf->fd = open(pidf->path, O_NOFOLLOW | O_CREAT | O_WRONLY | O_NONBLOCK | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1 && errno == EINTR);
171
error = errno;
172
173
/* Restore the default umask */
0 commit comments