diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-07-06 15:04:07 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-07-06 15:04:07 +0000 |
commit | 30ee76d489393d3b1ba5fd81c0c998ff1e56da8e (patch) | |
tree | 447bc717d5e10a4fee0cc8075eb1f55ebfcb7a05 /src/libunixonacid | |
parent | 9964840c291e46a0e001d930e2dd2fb0e1b16967 (diff) | |
download | skalibs-30ee76d489393d3b1ba5fd81c0c998ff1e56da8e.tar.xz |
More more jjk fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libunixonacid')
-rw-r--r-- | src/libunixonacid/open2_at.c | 8 | ||||
-rw-r--r-- | src/libunixonacid/open3_at.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/libunixonacid/open2_at.c b/src/libunixonacid/open2_at.c index 023c038..76d79cc 100644 --- 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 index d4234d4..063092d 100644 --- 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 |