Mail Archives: djgpp/1993/01/02/12:09:13
Eric Backus <src4src!mcdhup!rutgers!lsid.hp.com!ericb> writes:
> > >I want to communicate with a subprocess that I spawn using the system
> > >command. I tried to do this by setting some environment variables
> > >using setenv().
> >
> > The child runs off go32's environment, unfortunately.
>
> It seems like we could make a new "turbo-assist" entry for setenv(),
> to set go32's environment and thus the child's environment. Would
> this leave the parent's environment modifies when go32 exits? If so,
> we'd have to work around that somehow.
Yes, we could do that... _but_ there's no spare environment space to
modify (thank you MSDOS). When DOS spawns a child process, and in this
case go32 is a child of the command processor, it only allocates as
many bytes as are used in the parent's environment, not the number
specified for the master environment in config.sys. This is a defect in
DOS, and I'm not sure of a good workaround.
alane AT wozzle DOT linet DOT org (J. Alan Eldridge)
Fido: The University of Walamaloo 1:272/38.473
- Raw text -