diff options
author | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:34:30 -0500 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:34:30 -0500 |
commit | e5a951325a6cac8567af3a66de6d2df577508ae4 (patch) | |
tree | 34da9fe59f3c2d7f8edb072144443a9704197831 /source3/tests/fcntl_lock64.c | |
parent | 57482469b32645250e92a7ffd003aeeb4a42235e (diff) | |
download | samba-e5a951325a6cac8567af3a66de6d2df577508ae4.tar.gz samba-e5a951325a6cac8567af3a66de6d2df577508ae4.tar.bz2 samba-e5a951325a6cac8567af3a66de6d2df577508ae4.zip |
[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
Diffstat (limited to 'source3/tests/fcntl_lock64.c')
-rw-r--r-- | source3/tests/fcntl_lock64.c | 12 |
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); } |