On Tue, Jun 19, 2012 at 4:34 PM, Bill Freeman <ke1g...@gmail.com> wrote:
> What occurred to me is to send the final result to fd 3, which the
> shell would have to have opened before forking. ... get bash(sh)
> to build a pipe (unnamed) to the child process's fd 3,
> and either exec that (when it comes) or stuff it in a shell variable
> (which I can then exec), all without redirecting stdin, stdout, or
> stderr for the child.

  *Jackpot*!  [bell ringing noise]

  Check this out:

http://pastebin.com/RGBuRw0e

  It appears to work.

  It seems to me that the exec should not be needed -- that we should
be able to set-up all the file descriptors using subshells and
redirection on one line.  But I can't quite figure out how/why to get
that to happen, and I need sleep.

-- Ben

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to