#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)
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;
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);
}
}
unlink(DATA);
- return status;
+ exit(status);
}