Welcome to the CHICKEN Scheme pasting service
this gets stuck most times on 4.8.0.1 but works every time on 4.8.0 added by kiatoa on Sat Feb 16 00:58:55 2013
;; FYI: I'll try doing a bisect to find which patch causes this (define (conservative-read port) (let loop ((res '())) (if (not (eof-object? (peek-char port))) (loop (cons (read-char port) res)) (apply conc (reverse res))))) (define (cmd-run-with-stderr->list cmd . params) (let-values (((fh fho pid fhe) (if (null? params) (process* cmd) (process* cmd params)))) (let loop ((curr (read-line fh)) (result '())) (let ((errstr (conservative-read fhe))) (if (not (string=? errstr "")) (set! result (cons errstr result)))) (if (not (eof-object? curr)) (loop (read-line fh) (cons curr result)) (begin (close-input-port fh) (close-input-port fhe) (close-output-port fho) (reverse result)))))) (print "Got: " (cmd-run-with-stderr->list "ls"))