summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Helmer <ghelmer@FreeBSD.org>2012-02-20 13:59:24 +0000
committerGuy Helmer <ghelmer@FreeBSD.org>2012-02-20 13:59:24 +0000
commitfde4439701c797a5192e66202173fd331ec280f7 (patch)
tree7f8dbc18c63c2478554c2c55c37edaf0b471dc44
parent56799b608db583babcc758b0c4eba65cbcfafd71 (diff)
Notes
-rw-r--r--lib/libutil/pidfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c
index 55e3e0fa18301..bca0315b219c0 100644
--- a/lib/libutil/pidfile.c
+++ b/lib/libutil/pidfile.c
@@ -124,7 +124,7 @@ pidfile_open(const char *path, mode_t mode, pid_t *pidptr)
* pidfile_write() can be called multiple times.
*/
fd = flopen(pfh->pf_path,
- O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode);
+ O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
if (fd == -1) {
if (errno == EWOULDBLOCK && pidptr != NULL) {
count = 20;