Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cca!mirror!ishmael!inmet!ronw From: ronw@inmet.UUCP Newsgroups: comp.sys.ibm.pc Subject: MSC spawn() problem Message-ID: <149000015@inmet> Date: Tue, 1-Dec-87 22:55:00 EST Article-I.D.: inmet.149000015 Posted: Tue Dec 1 22:55:00 1987 Date-Received: Sun, 6-Dec-87 23:54:44 EST Lines: 27 Nf-ID: #N:inmet:149000015:000:1203 Nf-From: inmet.UUCP!ronw Dec 1 22:55:00 1987 I believe that the Microsoft C Compiler has problems with environment space when spawn-like library functions are used. Consider the following program: main() { system("command"); } When this program is run it spawns the sub-shell properly, but when you examine the environment variables with the SET command they appear fine except there is a little string of garbage at the end of the list that always contains the string ";C_FILE_INFO". To make matters worse, if you attempt to use SET to change old variables or create new ones, they are placed at the end of the list (after the garbage). When this happens, they are visible with the SET command but aren't visible to applications. If you exit from the subshell, the garbage disappears. This problem occurs with Microsoft C 3.0, 4.0, 5.0 with DOS versions 2.11, 3.0, 3.1, 3.2 (I haven't tried 3.3 yet) on NEC, IBM AT, TANDY, and Zenith machines. Oddly enough, the string of garbage characters is always the same. Using the SPAWN functions produces the same result. Since I use applications which spawn subshells that don't exhibit this problem, I'm assuming that it's MSC's fault. Any suggestions? Ron Wallace Intermetrics, Inc.