Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!rutgers!iuvax!iucs!bobmon
From: bobmon@iucs.UUCP
Newsgroups: comp.sources.bugs
Subject: Re: Microemacs 3.9 spawn.c #if problems
Message-ID: <4755@iucs.UUCP>
Date: Tue, 24-Nov-87 12:51:16 EST
Article-I.D.: iucs.4755
Posted: Tue Nov 24 12:51:16 1987
Date-Received: Sat, 28-Nov-87 04:47:50 EST
References: <2151@tut.cis.ohio-state.edu>
Reply-To: bobmon@iucs.UUCP (RAMontante [condition that I not be identified])
Organization: Indiana University, Bloomington
Lines: 30

mdf@tut.cis.ohio-state.edu (Mark D. Freeman) writes:
>
>In spawn.c, the "#if"s are inconsistant in the case of MSDOS and MSC.
>This concerns the use of "system()" vs. functions defined in spawn.c
>
>I played with it a little, and got it to compile, but I can't push a
>shell.
>
>Does anyone have the correct fixes?

[On rereading, I'm not as sure whether Mark is referring to v3.9 or v3.9e.
I assume he means v3.9 the original, not 3.9e.]

I had the same problem, using Turbo C.  I think that the problem is, the
system() call executes command.com in batch mode only, on a null input.  So
it just returns immediately.  A fix, though not a good one, is to change
a line that looks like
		system("");
to 		system("\\command.com");
(sorry, I'm not sure exactly where this is, but it's in the spawncli function,
near the middle/end (?:-))  This causes the batched command.com to run another,
interactive copy, wasting memory but giving you the effect you want.  This
probelm was in v3.8i, also.

BY THE WAY: in v3.9e, this is all VERY different.  Apparently Dan Lawrence is
replacing the system() call entirely with his own call, with some additional
functionality.  Unfortunately, it doesn't work either for me (TurboC, MSDOS3.1)
so I've stuck the system() calls back in [in the shellprog() function, and
disabled the execprg() function] until I can get it to work.  Any fixes for
this new stuff, anyone?