Email or username:

Password:

Forgot your password?
Andrew Tropin

Implementation of with-pipes function. It can be used for capturing i/o of threads or subprocesses for example.

Does it look like idiomatic Scheme code?

git.sr.ht/~abcdw/guile-nrepl/c

#sheme #lisp

2 comments
Andrew Tropin

It should be call-with-pipes to fit the naming convention.

Ludovic Courtès

@abcdw ‘with-pipes’ won’t close pipes in cases of a non-local exit of ‘proc’.

To protect against that, you can wrap the call to ‘proc’ in ‘with-exception-handler’ or similar. (It’s tempting to use ‘dynamic-wind’ but then that would prevent ‘proc’ or its callees from capturing a delimited continuation that spans the ‘with-pipes’ call.)

Go Up