From e89150597ac659f738f24fe06ef3a17559a81862 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Jun 2012 11:34:04 +0200 Subject: Revert "s3-lib Remove unused sys_fcntl_long()" This reverts commit 846a697e20478798288afb43cdb7a9f389a15c69. This is still used in source3/smbd/oplock_irix.c metze --- source3/lib/system.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/lib/system.c') 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. ****************************************************************************/ -- cgit