mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 13:16:36 +02:00
Adding process->sexp utility.
This commit is contained in:
parent
4ade4f7d2a
commit
b7676fbb47
2 changed files with 5 additions and 1 deletions
|
@ -113,6 +113,9 @@
|
||||||
(waitpid pid 0)
|
(waitpid pid 0)
|
||||||
res))))
|
res))))
|
||||||
|
|
||||||
|
(define (process->sexp str)
|
||||||
|
(call-with-input-string (process->string str) read))
|
||||||
|
|
||||||
(define (process->output+error str)
|
(define (process->output+error str)
|
||||||
(call-with-process-io
|
(call-with-process-io
|
||||||
str
|
str
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
signal/stop signal/tty-stop signal/tty-input
|
signal/stop signal/tty-stop signal/tty-input
|
||||||
signal/tty-output wait/no-hang
|
signal/tty-output wait/no-hang
|
||||||
call-with-process-io
|
call-with-process-io
|
||||||
process->string process->string-list process->output+error)
|
process->string process->sexp
|
||||||
|
process->string-list process->output+error)
|
||||||
(import (chibi) (chibi io) (chibi string) (chibi filesystem))
|
(import (chibi) (chibi io) (chibi string) (chibi filesystem))
|
||||||
(cond-expand (threads (import (srfi 18) (srfi 33))) (else #f))
|
(cond-expand (threads (import (srfi 18) (srfi 33))) (else #f))
|
||||||
(include-shared "process")
|
(include-shared "process")
|
||||||
|
|
Loading…
Add table
Reference in a new issue