No fork() in MSC5.0, help...

brian at bradley.UUCP brian at bradley.UUCP
Fri Jul 22 01:50:00 AEST 1988


  My thanks to everyone who responded to my question on doing
I/O redirection for a child process without disturbing the
parent processes I/O under Microsoft C 5.0.

  Apparently the only way to do it is by using dup() to copy
stdin/stdout/stderr before starting the child process, and
dup2() to restore them afterwards.

  The only drawback is that Microsoft C already reserves 5 fildes.
If I dup() three, that only leaves 12 for the child process...

...............................................................................

  When the going gets weird, the weird turn pro.

  Brian Michael Wendt       UUCP: {cepu,ihnp4,uiucdcs,noao}!bradley!brian
  Bradley University        ARPA: cepu!bradley!brian at seas.ucla.edu
  (309) 677-2230            ICBM: 40 40' N  89 34' W



More information about the Comp.lang.c mailing list