summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2007-05-10 14:54:53 +0000
committerdes <des@FreeBSD.org>2007-05-10 14:54:53 +0000
commit82f6d6455dede62c65d652a332345893ba12105e (patch)
treea208d4e92c5c194bc3f04903644683f2fe3f80b5 /lib
parent50d71f5464b9302c59bba4260b8b48f2ebef7142 (diff)
downloadFreeBSD-src-82f6d6455dede62c65d652a332345893ba12105e.zip
FreeBSD-src-82f6d6455dede62c65d652a332345893ba12105e.tar.gz
Use flopen(3).
MFC after: 3 weeks
Diffstat (limited to 'lib')
-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 fc15163..e002d65 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);
OpenPOWER on IntegriCloud