[comp.sys.ibm.pc] DOS 4.0 and MSC 5.1 system

nts0699@dsacg1.UUCP (Gene McManus) (08/22/88)

In a program I've written, I build a batch file and put it into
execution with an MSC system() function call. Under DOS 3.2, 3.3,
all is well. Under DOS 4.0, the batch file does not execute. The
COMMAND.COM file is in the path, adequate memory is available. I
haven't seen any error messages or codes.
 
 Any ideas what could be going on? Anybody else having problems
 with system() under DOS 4.0?

 Thanx in advance for help/hints, etc.

 Gene
Gene McManus @ Defense Logistics Agency Systems Automation Center,
	       Columbus, OH 43215 (614) 238-9403,    Autovon 850-
UUCP:		{uunet!gould,cbosgd!osu-cis}!dsacg1!gmcmanus
The views expressed are my own, not those of The Agency, or Dept. of Defense

madd@bu-cs.BU.EDU (Jim Frost) (08/24/88)

In article <531@dsacg1.UUCP> nts0699@dsacg1.UUCP (Gene McManus) writes:
|In a program I've written, I build a batch file and put it into
|execution with an MSC system() function call. Under DOS 3.2, 3.3,
|all is well. Under DOS 4.0, the batch file does not execute. The
|COMMAND.COM file is in the path, adequate memory is available. I
|haven't seen any error messages or codes.

I can't say for sure since I don't have MSC but there are two ways
that system() can be implemented.  One of them is much like the UNIX
exec() calls where you can just run binary files directly.  Under some
versions of MS-DOS this works well but some have the loader portion of
the MS-DOS EXEC function in COMMAND.COM and there are problems (shoot
the bugger who did that).  The other way to do it is to run the
COMSPEC shell with "/C" and the command line you want to run.  This is
most likely how they do it but I don't have their manual to check.

One possible thing to try is running the batch file in a command.com
explicitly:

	char s[100];
	sprintf(s, "%s /C %s", getenv("COMSPEC"), "batfile");
	system(s);

It would probably be brighter to use the MSC exec or spawn class of
functions than system() but without a manual I can't be certain.

Also, 4.0 may have changed the way they handle shelling out; does
anyone have info on that?  I know that they now have a presentation
managerish shell so this is quite likely.  If this is the case then
libraries not designed for 4.0 would fail (along with lots of
applications!)

jim frost
madd@bu-it.bu.edu