[comp.sources.bugs] Microemacs 3.9 spawn.c #if problems

mdf@tut.UUCP (11/24/87)

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?

-- 
Mark D. Freeman							(614) 262-3703
StrongPoint Systems, Inc.			    mdf@tut.cis.ohio-state.edu
2440 Medary Avenue		 ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!mdf
Columbus, OH  43202-3014	    Guest account at The Ohio State University

bobmon@iucs.UUCP (11/24/87)

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?

mdf@tut.UUCP (11/26/87)

In <4755@iucs.UUCP> bobmon@iucs.UUCP writes:
>I wrote:
>>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
>
>[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.]
>
Unfortunately, my problem is in 3.9e.

>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.  

My problem concerns the #if statements used to determine when to use
the new calls and when to use system().  Help?!









-- 
Mark D. Freeman							(614) 262-3703
StrongPoint Systems, Inc.			    mdf@tut.cis.ohio-state.edu
2440 Medary Avenue		 ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!mdf
Columbus, OH  43202-3014	    Guest account at The Ohio State University