From 652b8b34f8b326f79771b03e039cfa3c6ba3427e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2004 20:21:54 +0000 Subject: r3441: some include file cleanups and general housekeeping (This used to be commit 73ea8ee6c268371d05cf74160f2ad451dd2ae699) --- source4/lib/pidfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/pidfile.c') diff --git a/source4/lib/pidfile.c b/source4/lib/pidfile.c index 989f19b323..f8041a2005 100644 --- a/source4/lib/pidfile.c +++ b/source4/lib/pidfile.c @@ -37,7 +37,7 @@ pid_t pidfile_pid(const char *name) slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name); - fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644); + fd = open(pidFile, O_NONBLOCK | O_RDONLY, 0644); if (fd == -1) { return 0; } @@ -54,7 +54,7 @@ pid_t pidfile_pid(const char *name) goto noproc; } - if (fcntl_lock(fd,SMB_F_SETLK,0,1,F_RDLCK)) { + if (fcntl_lock(fd,F_SETLK,0,1,F_RDLCK)) { /* we could get the lock - it can't be a Samba process */ goto noproc; } @@ -85,14 +85,14 @@ void pidfile_create(const char *name) exit(1); } - fd = sys_open(pidFile, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL, 0644); + fd = open(pidFile, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL, 0644); if (fd == -1) { DEBUG(0,("ERROR: can't open %s: Error was %s\n", pidFile, strerror(errno))); exit(1); } - if (fcntl_lock(fd,SMB_F_SETLK,0,1,F_WRLCK)==False) { + if (fcntl_lock(fd,F_SETLK,0,1,F_WRLCK)==False) { DEBUG(0,("ERROR: %s : fcntl lock of file %s failed. Error was %s\n", name, pidFile, strerror(errno))); exit(1); -- cgit