s3: VFS: Add SMB_VFS_FCNTL
[amitay/samba.git] / source3 / lib / system.c
index def8281fc437172c2573c24b29557e7a62665ac6..679332255c008aa3300ef5c7cef38d80d30d23b3 100644 (file)
@@ -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.
 ****************************************************************************/