summaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-01-26 09:42:46 +0100
committerLudovic Courtès <ludo@gnu.org>2023-01-26 09:42:46 +0100
commit5b42f8c154906584455a4989038406c88b723cb0 (patch)
tree888bdb38f3d2d67faf6c970647bff519e86524d1 /test-suite
parent35566ea585d6ebb0e97a83956de6a39ae2a0c2d5 (diff)
downloadguile-5b42f8c154906584455a4989038406c88b723cb0.tar.gz
'spawn' ensures it is passed open file ports.
Fixes <https://bugs.gnu.org/61073>. * libguile/posix.c (FDES_FROM_PORT_OR_INTEGER): When OBJ is not an integer, use 'SCM_VALIDATE_OPFPORT' before using 'SCM_FPORT_FDES'. * test-suite/tests/posix.test ("spawn")["non-file port argument"]: New test.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/tests/posix.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test
index bd3e6218c..f20e04453 100644
--- a/test-suite/tests/posix.test
+++ b/test-suite/tests/posix.test
@@ -386,6 +386,11 @@
0
(cdr (waitpid (spawn "true" '("true")))))
+ (pass-if-exception "non-file port argument" ;<https://bugs.gnu.org/61073>
+ exception:wrong-type-arg
+ (spawn "true" '("true")
+ #:error (%make-void-port "w")))
+
(pass-if-equal "uname with stdout redirect"
(list 0 ;exit value
(string-append (utsname:sysname (uname)) " "