commit 30ee76d489393d3b1ba5fd81c0c998ff1e56da8e
parent 9964840c291e46a0e001d930e2dd2fb0e1b16967
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Thu, 6 Jul 2023 15:04:07 +0000
More more jjk fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat:
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/libunixonacid/open2_at.c b/src/libunixonacid/open2_at.c
@@ -9,12 +9,18 @@
#endif
#include <skalibs/nonposix.h>
+
+#include <errno.h>
#include <fcntl.h>
+
#include <skalibs/unix-transactional.h>
int open2_at (int dirfd, char const *file, int flags)
{
- return openat(dirfd, file, flags) ;
+ int fd ;
+ do fd = openat(dirfd, file, flags) ;
+ while (fd == -1 && errno == EINTR) ;
+ return fd ;
}
#else
diff --git a/src/libunixonacid/open3_at.c b/src/libunixonacid/open3_at.c
@@ -9,12 +9,18 @@
#endif
#include <skalibs/nonposix.h>
+
+#include <errno.h>
#include <fcntl.h>
+
#include <skalibs/unix-transactional.h>
int open3_at (int dirfd, char const *file, int flags, unsigned int mode)
{
- return openat(dirfd, file, flags, mode) ;
+ int fd ;
+ do fd = openat(dirfd, file, flags, mode) ;
+ while (fd == -1 && errno == EINTR) ;
+ return fd ;
}
#else