Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!axion!planet!prk From: prk@planet.bt.co.uk (Peter Knight) Newsgroups: comp.os.msdos.programmer Subject: Re: MS-DOS EXEC Question Message-ID: Date: 12 Sep 90 08:18:06 GMT References: <1990Sep7.144359.25202@jarvis.csri.toronto.edu> Sender: usenet@planet.bt.co.uk (Usenet News Manager) Organization: RT743, BT Research Labs, Martlesham Heath, Ipswich, UK. Lines: 21 west@turing.toronto.edu (Tom West) writes: > Does anyone know what the behaviour of the EXEC MS-DOS function is when >there is not enough memory to load COMMAND.COM. >Specifically, I have a line that is: > retcode = spawnve(P_WAIT, "C:\COMMAND.COM", path, environ); For my two-pennies worth, if your line reads as you have typed it here, you are bound to run into trouble. \ is the C string escape char, so the line to the program looks like "C:COMMON.COM", ie the directory information is lost. (\C goes to C). If the current directory for C: does not contain a COMMAND.COM, then you should get some failure. Better to get the directory information from the environment variable, COMSPEC. Peter Knight BT Research #include