diff options
| author | Peter Bex <peter@more-magic.net> | 2012-10-02 21:34:57 +0200 | 
|---|---|---|
| committer | Peter Bex <peter@more-magic.net> | 2012-10-02 21:34:57 +0200 | 
| commit | 9aad14a928c3a2f8bff2ed9b0b6e13f528645f0b (patch) | |
| tree | 6fdb657362d33aca75ac7d43feaaca1ccfaa2e4f | |
| parent | 9e76b49621308e19f93b627d6fdddeb29f466f39 (diff) | |
| download | scsh-process-9aad14a928c3a2f8bff2ed9b0b6e13f528645f0b.tar.gz | |
Ensure port is closed before returning from run/sexp*; this would hopefull ensure processes don't hang when they keep writing while the pipe buffer is full.  Instead, it would kill the process with sigpipe
| -rw-r--r-- | scsh-process.scm | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/scsh-process.scm b/scsh-process.scm index b9ca087..b568e94 100644 --- a/scsh-process.scm +++ b/scsh-process.scm @@ -157,7 +157,10 @@  (define (run/strings* thunk)    (read-lines (run/port* thunk)))  (define (run/sexp* thunk) -  (read (run/port* thunk))) +  (let* ((p (run/port* thunk)) +         (res (read p))) +    (close-input-port p) +    res))  (define (run/sexps* thunk)    (read-file (run/port* thunk))) | 
