summaryrefslogtreecommitdiff
path: root/source3/tests/fcntl_lock64.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tests/fcntl_lock64.c')
-rw-r--r--source3/tests/fcntl_lock64.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/tests/fcntl_lock64.c b/source3/tests/fcntl_lock64.c
index b218fa9282..e5ecd88fd0 100644
--- a/source3/tests/fcntl_lock64.c
+++ b/source3/tests/fcntl_lock64.c
@@ -16,10 +16,6 @@
#include <sys/fcntl.h>
#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
#include <errno.h>
static int sys_waitpid(pid_t pid,int *status,int options)
@@ -44,7 +40,7 @@ int main(int argc, char *argv[])
sleep(2);
fd = open64(DATA, O_RDONLY);
- if (fd == -1) return 1;
+ if (fd == -1) exit(1);
lock.l_type = F_WRLCK;
lock.l_whence = SEEK_SET;
@@ -60,10 +56,10 @@ int main(int argc, char *argv[])
if ((ret == -1) ||
(lock.l_type == F_UNLCK)) {
/* printf("No lock conflict\n"); */
- return 1;
+ exit(1);
} else {
/* printf("lock conflict\n"); */
- return 0;
+ exit(0);
}
}
@@ -96,5 +92,5 @@ int main(int argc, char *argv[])
unlink(DATA);
- return status;
+ exit(status);
}