Fix , which affects GNU/Hurd. diff --git a/libguile/posix.c b/libguile/posix.c index 3a8be94e4..f5fdc544c 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1326,7 +1326,14 @@ static void close_inherited_fds_slow (posix_spawn_file_actions_t *actions, int max_fd) { while (--max_fd > 2) - posix_spawn_file_actions_addclose (actions, max_fd); + { + /* Adding invalid file descriptors to an 'addclose' action leads + to 'posix_spawn' failures on some operating systems: + . Hence the extra check. */ + int flags = fcntl (max_fd, F_GETFD, NULL); + if ((flags >= 0) && ((flags & FD_CLOEXEC) == 0)) + posix_spawn_file_actions_addclose (actions, max_fd); + } } static void Fix . diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test index f20e04453..d5cf47cda 100644 --- a/test-suite/tests/posix.test +++ b/test-suite/tests/posix.test @@ -431,7 +431,13 @@ (let ((str (get-string-all (car input+output)))) (close-port (car input+output)) (waitpid pid) - str))) + + ;; On GNU/Hurd, the exec server prepends 'LD_ORIGIN_PATH' for + ;; every program: . Strip it. + (if (and (string=? "GNU" (utsname:sysname (uname))) + (string-prefix? "LD_ORIGIN_PATH=" str)) + (string-drop str (+ 1 (string-index str #\newline))) + str)))) (pass-if-equal "ls /proc/self/fd" "0\n1\n2\n3\n" ;fourth FD is for /proc/self/fd ediverse.scm'>
AgeCommit message (Expand)Author
2024-12-14gnu: toot: Fix build....* gnu/packages/fediverse.scm (toot)[native-inputs]: Add python-setuptools and python-wheel. Change-Id: I404c25a277f455169c294e8fdcfcd1596ebce0e1 Efraim Flashner
2024-11-28gnu: snac: Update to 2.65....* gnu/packages/fediverse.scm (snac2): Update to 2.65. Change-Id: Ie61958a9e31e8131e29bd9327730daa74b7bc4e7 Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn> Ashish SHUKLA
2024-11-14gnu: snac2: Update to 2.63....* gnu/packages/fediverse.scm (snac2): Update to 2.63. [arguments]: Adjust make-flags to install the man-pages in the correct directory. Change-Id: I51a2434fda3d6a2ea92a342f346f5a4f1af7fa3d Efraim Flashner
2024-09-25gnu: tuba: Update to 0.8.4....* gnu/packages/fediverse.scm (tuba): Update to 0.8.4. [inputs]: Add bash-minimal. Change-Id: I888fb76603c1857318bc35d2bfd0e0169510ffad Efraim Flashner