scala/scala — pull request #196 by dcsobral (2012-02-15 22:19:39+00:00)
Title: Close file descriptor leak in sys.process. (SI-5439)

This closes most file descriptor leaks in sys.process through
the simple expedient of making sure every InputStream being read
by BasicIO is closed once there's nothing more to read.

A single file descriptor leak would remain for the OutputStream
(that is, that process stdin) of each Process, which is closed after the
InputStream being read to feed it is closed. Special care is taken
not to close the calling process stdin.

Fix an additional non-reported by where sending data to a process
that had already terminated would result in an exception being thrown.

File descriptors can still leak in some conditions that must be
handled by user code. Documentation to that effect will follow.

Closes SI-5439.