AtlatestRepositorysigil-wm

sigil-wm / tree / testsocket-collision.sgl

1(import (sigil async) (sigil io) (sigil wm host))
2(define host (start-host! socket: "activation-probe"))
3(define failed? #f)
4(guard (exception
5 (#t (set! failed? (and (vector? exception)
6 (equal? (vector-ref exception 2) "native host failed")))))
7 (with-async (run-host! host)))
8(unless (and failed? (not (host-running? host))
9 (every (lambda (index) (= (host-statistic host index) 0)) '(1 2 3 4)))
10 (error "socket collision did not fail cleanly"))
11(display "SOCKET_COLLISION=PASS occupied endpoint preserved clean startup unwind\n")