Created
January 28, 2016 21:30
-
-
Save shirok/7012bbe3430d025bd6e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use gauche.process) | |
(use rfc.http) | |
(define (spawn-and-talk-to-server) | |
(let* ([p (run-process '("gosh" "./server-script.scm") :wait #f :output :pipe)] | |
[s (read-line (process-output p))]) | |
(unwind-protect | |
(and (string? s) (#/^\d+$/ s) | |
(http-get #"localhost:~s" "/")) | |
(process-kill p) | |
(process-wait p)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment