summaryrefslogtreecommitdiff
path: root/source3/lib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r--source3/lib/system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 92596a8d72..3daa041a27 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -198,6 +198,20 @@ int sys_fcntl_ptr(int fd, int cmd, void *arg)
return ret;
}
+/*******************************************************************
+A fcntl wrapper that will deal with EINTR.
+********************************************************************/
+
+int sys_fcntl_long(int fd, int cmd, long 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.
****************************************************************************/