skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 86e231a8dfcd1e032bda5f927214bf385222ff02
parent 1f4796c190f54afb12b959bcd3f8c097d8e115ba
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Tue,  2 Jan 2024 01:52:51 +0000

 cspawn can use open3() over open() for consistency

Signed-off-by: Laurent Bercot <ska@appnovation.com>

Diffstat:
Msrc/libstddjb/cspawn.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/libstddjb/cspawn.c b/src/libstddjb/cspawn.c @@ -7,7 +7,6 @@ #endif #include <errno.h> -#include <fcntl.h> #include <unistd.h> #include <skalibs/allreadwrite.h> @@ -15,7 +14,6 @@ #include <skalibs/djbunix.h> #include <skalibs/selfpipe.h> #include <skalibs/exec.h> - #include <skalibs/cspawn.h> static inline void cspawn_child_exec (char const *prog, char const *const *argv, char const *const *envp, uint16_t flags, cspawn_fileaction const *fa, size_t n) @@ -34,7 +32,7 @@ static inline void cspawn_child_exec (char const *prog, char const *const *argv, break ; case CSPAWN_FA_OPEN : { - int fd = open(fa[i].x.openinfo.file, fa[i].x.openinfo.oflag, fa[i].x.openinfo.mode) ; + int fd = open3(fa[i].x.openinfo.file, fa[i].x.openinfo.oflag, fa[i].x.openinfo.mode) ; if (fd == -1) return ; if (fd_move(fa[i].x.openinfo.fd, fd) == -1) return ; break ;