--- o/run_process.c.orig 2010-08-04 15:44:27.000000000 -0600
+++ o/run_process.c 2010-12-29 11:33:45.670403342 -0700
@@ -528,10 +528,10 @@ char **argv;
fdout = ostream->sm.sm_int0;
if (fork() == 0)
{ /* the child --- replace standard in and out with descriptors given */
- close(0);
- dup(fdin);
- close(1);
- dup(fdout);
+ dup2(fdin, 0);
+ dup2(fdout, 1);
+ close(fdin);
+ close(fdout);
fprintf(stderr, "\n***** Spawning process %s ", pname);
if (execvp(pname, argv) == -1)
{