From a58812d5404844274298344babdb079e161d164f Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 16 Oct 2026 07:12:56 +0000 Subject: Prepare for 2.16.0.0, remove waitn*, change openslurpclose_at --- src/libunixonacid/openslurpnclose_at.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/libunixonacid/openslurpnclose_at.c (limited to 'src/libunixonacid/openslurpnclose_at.c') diff --git a/src/libunixonacid/openslurpnclose_at.c b/src/libunixonacid/openslurpnclose_at.c new file mode 100644 index 0000000..8880a71 --- /dev/null +++ b/src/libunixonacid/openslurpnclose_at.c @@ -0,0 +1,17 @@ +/* ISC license. */ + +#include +#include + +int openslurpnclose_at (int dirfd, char const *fn, stralloc *sa, size_t n) +{ + int fd = openc_readatb(dirfd, fn) ; + if (fd < 0) return 0 ; + if (!slurpn(fd, sa, n)) + { + fd_close(fd) ; + return 0 ; + } + fd_close(fd) ; + return 1 ; +} -- cgit v1.3.1