fix I/O race in test
This commit is contained in:
parent
6cacd57ebc
commit
3d76aa5c32
|
@ -123,15 +123,12 @@
|
||||||
(flush-output (cadr p))
|
(flush-output (cadr p))
|
||||||
(thread-wait t)
|
(thread-wait t)
|
||||||
(fprintf (cadr p) "(begin ((copy-stream r w2)) (exit))\n"))
|
(fprintf (cadr p) "(begin ((copy-stream r w2)) (exit))\n"))
|
||||||
(fprintf (cadr p) "(begin (flush-output) ((copy-stream (current-input-port) (current-output-port))) (exit))\n"))
|
(fprintf (cadr p) "(begin (display \"!READY!\") (flush-output) ((copy-stream (current-input-port) (current-output-port))) (exit))"))
|
||||||
(flush-output (cadr p))
|
(flush-output (cadr p))
|
||||||
|
|
||||||
(unless tcp?
|
(unless tcp?
|
||||||
;; Flush initial output from other process:
|
;; Flush initial output from other process:
|
||||||
(let loop ()
|
(regexp-match #rx"!READY!" (car p)))
|
||||||
(sleep 0.3)
|
|
||||||
(unless (zero? (read-bytes-avail!* s (car p)))
|
|
||||||
(loop))))
|
|
||||||
|
|
||||||
(if tcp?
|
(if tcp?
|
||||||
(values r w r2 w2)
|
(values r w r2 w2)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user