@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.)