1 /* padlock_fcntl.c
2 ** posix advisory locking module
3 ** wcm, 2008.01.04 - 2008.02.11
4 ** ===
5 */
6 
7 #include <unistd.h>
8 #include <errno.h>
9 #include <fcntl.h>
10 #include <sys/types.h>
11 
12 #include "padlock.h"
13 
14 
15 int
padlock_fcntl(int fd,int cmd,struct flock * lock)16 padlock_fcntl(int fd, int cmd, struct flock *lock)
17 {
18   int  e;
19 
20   do{
21       e = fcntl(fd, cmd, lock);
22   }while((e == -1) && (errno == EINTR));
23 
24   return e;
25 }
26 
27 
28 /* EOF (padlock_fcntl.c) */
29