Rob Browning writes: > > Offhand, I'd guess some kind of exception would be in order. * strports.c (scm_call_with_output_string): scm_get_output_string rather than scm_strport_to_string, so as to guard against the port having been closed by the called procedure. * tests/ports.test (call-with-output-string): Test proc closing port. * scheme-io.texi (String Ports): In call-with-output-string, note proc should not close the port. In get-output-string, note string must be gotten before closing the port. This would be a candidate for the 1.6 branch too, if the solution seems ok.