diff options
author | Anoop C S <anoopcs@redhat.com> | 2019-09-27 11:19:37 +0530 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-10-08 08:38:32 +0000 |
commit | 5084a69de14f24e9d804998580eefcba773fdd5a (patch) | |
tree | b916c4c98de899dbf47e16c87c46e780ea558e5d /source3/lib | |
parent | c9d302f20b066267a8fd2d7ce4dc171161c9c40c (diff) | |
download | samba-5084a69de14f24e9d804998580eefcba773fdd5a.tar.gz |
s3: VFS: Add SMB_VFS_FCNTL
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/system.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index def8281fc43..679332255c0 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -108,6 +108,20 @@ int sys_fcntl_long(int fd, int cmd, long arg) return ret; } +/******************************************************************* +A fcntl wrapper that will deal with EINTR. +********************************************************************/ + +int sys_fcntl_int(int fd, int cmd, int arg) +{ + int ret; + + do { + ret = fcntl(fd, cmd, arg); + } while (ret == -1 && errno == EINTR); + return ret; +} + /**************************************************************************** Get/Set all the possible time fields from a stat struct as a timespec. ****************************************************************************/ |