mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 07:10:20 +02:00
socket test should not throw unresolved outside of a test
* test-suite/tests/00-socket.test: don't throw unresolved outside of a test
This commit is contained in:
parent
c65154ac69
commit
91d4d31184
1 changed files with 19 additions and 18 deletions
|
@ -264,11 +264,12 @@
|
||||||
|
|
||||||
(force-output (current-output-port))
|
(force-output (current-output-port))
|
||||||
(force-output (current-error-port))
|
(force-output (current-error-port))
|
||||||
(if server-listening?
|
(when server-listening?
|
||||||
(let ((pid (primitive-fork-if-available)))
|
(let ((pid (primitive-fork-if-available)))
|
||||||
;; Spawn a server process.
|
;; Spawn a server process.
|
||||||
(case pid
|
(case pid
|
||||||
((-1) (throw 'unresolved))
|
((-1) ;; fork not available
|
||||||
|
#f)
|
||||||
((0) ;; the kid: serve two connections and exit
|
((0) ;; the kid: serve two connections and exit
|
||||||
(let serve ((conn
|
(let serve ((conn
|
||||||
(false-if-exception (accept server-socket)))
|
(false-if-exception (accept server-socket)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue