s3-lib: Fix conversion of lib/events.c to modern tevent names
[kai/samba.git] / source3 / lib / pidfile.c
index 469ddbd95fd83d7c460d7b9ea8df3be7e85cccf9..ec2044f327236d669daa942ad74881b8b98c3eca 100644 (file)
@@ -66,7 +66,7 @@ pid_t pidfile_pid(const char *program_name)
 
        SAFE_FREE(name);
 
-       fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
+       fd = open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
        if (fd == -1) {
                SAFE_FREE(pidFile);
                return 0;
@@ -92,7 +92,7 @@ pid_t pidfile_pid(const char *program_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;
        }
@@ -147,7 +147,7 @@ void pidfile_create(const char *program_name)
                exit(1);
        }
 
-       fd = sys_open(pidFile_name, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL,
+       fd = open(pidFile_name, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL,
                      0644);
        if (fd == -1) {
                DEBUG(0,("ERROR: can't open %s: Error was %s\n", pidFile_name,
@@ -155,7 +155,7 @@ void pidfile_create(const char *program_name)
                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_name, strerror(errno)));
                exit(1);