Inhibit premature closing of pty handling process on NT.
On NT ptys are provided via a proxy process (aka ConPTY) which (is supposed to) shuts down when all client connections are gone. The problem is that the master side may still want to use the connection for more processes.
The easiest way to do this is likely to spawn a process attached to the ConPTY that attempts to read from a pipe whose other end is controlled by the pike-side slave pty, and terminates when the pipe closes. To do this on a POSIX system eg
cat(1) would suffice, I'm however unsure on NT.
Side note: The subprocess could potentially also be used to simulate a connection on the slave side of the ConPTY.