From: mcastle AT cs DOT umr DOT edu Subject: Re: environment and system calls To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Fri, 1 Jan 93 15:39:18 CST Amazingly enough mcastle said: >From mcastle Fri Jan 1 15:15:40 1993 Subject: Re: environment and system calls To: ericb AT lsid DOT hp DOT com (Eric Backus) Date: Fri, 1 Jan 93 15:15:40 CST In-Reply-To: <9301012035 DOT AA15361 AT labejb DOT lsid DOT hp DOT com>; from "Eric Backus" at Jan 1, 93 12:35 pm X-Mailer: ELM [version 2.3 PL11] Amazingly enough Eric Backus said: > In-Reply-To: <9212311355 DOT AA03458 AT express DOT ctron>; from "DJ Delorie" at Dec 31, 92 8:55 am > Mailer: Elm [revision: 66.25] > > > >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. > -- > Eric Backus > ericb AT lsid DOT hp DOT com > (206) 335-2495 I don't think this would affect the parent environment if you just use the standard turbo-c libs (you CAN change the parent environment vars under dos, but it involves mucking about with the PSP and stuff, and is generally frowned upon :-). Actually, go32 environment needs only be modified on the system() call, so it wouldn't even have to be a turbo-assist entry. A couple of problems I see with this though: possibly running out of environment space (I'm not sure what happens if you don't have enough room) and yet more realmode code added to go32 (do we really want this functionality?). mrc -- Mike Castle .-=NEXUS=-. Life is like a clock: You can work constantly mcastle AT cs DOT umr DOT edu and be right all the time, or not work at all S087891 AT UMRVMA DOT UMR DOT EDU and be right at least twice a day. -- mrc We are all of us living in the shadow of Manhattan. -- Watchmen