From 8c130ca0117fd225c24569be2ec16c7dc2150a13 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 8 Jun 2024 14:18:46 -0400 Subject: xspawn: Check X_OK even without $PATH resolution Not all posix_spawn() implementations use errno to report execv() failures from the child process, as that requires either a kernel posix_spawn() implementation or a pipe to pass the error back. This should fix tests/posix/exec_nonexistent on OpenBSD and HPPA. Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hppa&ver=3.3.1-1&stamp=1717489148&raw=0 --- tests/xspawn.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/xspawn.c b/tests/xspawn.c index b1d6dc1..f48e220 100644 --- a/tests/xspawn.c +++ b/tests/xspawn.c @@ -179,6 +179,8 @@ static bool check_resolve(void) { ret &= bfs_echeck(!bfs_spawn_resolve("eW6f5RM9Qi") && errno == ENOENT); + ret &= bfs_echeck(!bfs_spawn_resolve("bin/eW6f5RM9Qi") && errno == ENOENT); + return ret; } -- cgit v1.2.3