[MLton] Cygwin->Mingw32: patch + future

Stephen Weeks MLton@mlton.org
Tue, 23 Nov 2004 12:26:58 -0800


> Note, you wanted
> 	val getStderr: t -> output FileDesc.t
> (not input).

No.  The input/output are interpreted from the parent process's
perspective (and correspond to instream/outstream respectively).  So,
when we getStderr from the child, it appears as input to us.
Similarly, when we getStdin from the child, it appears as output to
us.

      val getStderr: t -> input FileDesc.t
      val getStdin: t -> output FileDesc.t
      val getStdout: t -> input FileDesc.t

This also explains why the arguments to create have the opposite
directions.

      val create: {...
		   stderr: output Param.t,
		   stdin: input Param.t,
		   stdout: output Param.t} -> t

For our child to be able to get input on stdin, it must be something
that one can get input from.  Similarly, for a child to be able output
on stdout, it must be something that one can output to.