Open both input and output ports to the same fd before using either, to prevent one closing the fd.
Open both input and output ports to the same fd before using either,
to prevent one closing the fd.

holmescn/chibi-scheme,norton/chibi-scheme,holmescn/chibi-scheme,holmescn/chibi-scheme,norton/chibi-scheme,holmescn/chibi-scheme,norton/chibi-scheme,norton/chibi-scheme,norton/chibi-scheme,norton/chibi-scheme,holmescn/chibi-scheme