summaryrefslogtreecommitdiff
path: root/lib/libutil/pidfile.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2007-05-10 14:54:53 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2007-05-10 14:54:53 +0000
commit3884dc6768961113726a925196bd79921c167ca8 (patch)
treea208d4e92c5c194bc3f04903644683f2fe3f80b5 /lib/libutil/pidfile.c
parent3dea5934000e33ef21d9784a9575a89f9a7f557b (diff)
Notes
Diffstat (limited to 'lib/libutil/pidfile.c')
-rw-r--r--lib/libutil/pidfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c
index fc1516340cf7..e002d6534a6d 100644
--- a/lib/libutil/pidfile.c
+++ b/lib/libutil/pidfile.c
@@ -112,8 +112,8 @@ pidfile_open(const char *path, mode_t mode, pid_t *pidptr)
* PID file will be truncated again in pidfile_write(), so
* pidfile_write() can be called multiple times.
*/
- fd = open(pfh->pf_path,
- O_WRONLY | O_CREAT | O_EXLOCK | O_TRUNC | O_NONBLOCK, mode);
+ fd = flopen(pfh->pf_path,
+ O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode);
if (fd == -1) {
if (errno == EWOULDBLOCK && pidptr != NULL) {
errno = pidfile_read(pfh->pf_path, pidptr);