From 1f95925304ab8ba519ea88b15c204909da492034 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Wed, 14 Oct 2015 12:57:49 +0200 Subject: [PATCH] compiles on OSX better --- lsyncd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lsyncd.c b/lsyncd.c index baaed77..7b04714 100644 --- a/lsyncd.c +++ b/lsyncd.c @@ -664,7 +664,9 @@ write_pidfile( const char *pidfile ) { - pidfile_fd = open( pidfile, O_CREAT | O_RDWR | O_CLOEXEC, 0644 ); + pidfile_fd = open( pidfile, O_CREAT | O_RDWR, 0644 ); + + fcntl( pidfile_fd, F_SETFD, FD_CLOEXEC ); char buf[ 127 ];