diff options
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r-- | source3/lib/system.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index eaaa76743a..d9a4bbd83b 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -151,7 +151,22 @@ ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *f A fcntl wrapper that will deal with EINTR. ********************************************************************/ -int sys_fcntl(int fd, int cmd, void *arg) +int sys_fcntl_ptr(int fd, int cmd, void *arg) +{ + int ret; + + do { + errno = 0; + ret = fcntl(fd, cmd, arg); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* +A fcntl wrapper that will deal with EINTR. +********************************************************************/ + +int sys_fcntl_long(int fd, int cmd, long arg) { int ret; |