Article View: comp.os.msdos.programmer
Article #2131Re: MS-DOS EXEC Question
From: Timo Salmi LASK
Date: Sun, 09 Sep 1990 06:39
Date: Sun, 09 Sep 1990 06:39
29 lines
1844 bytes
1844 bytes
In article <eJB8o4w163w@mudos.ann-arbor.mi.us> mju@mudos.ann-arbor.mi.us (Marc Unangst) writes: >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); >[computer locks up when there isn't enough mem to load COMMAND.COM] > >This isn't going to help you much, but I've encountered this in >Zenith's MS-DOS v3.21 also. Your best bet might be to check to see if >there's at least 50K left, and refuse to spawn the command processor >if there isn't. This is somewhat of a sideline since I use Turbo Pascak instead of C. If you try to execute a shell of a single command in TP, you can test for the result of the operation and take appropriate action. The example demonstrates executing a single command. SwapVectors; Exec (GetEnv(comspec), '/c ' + 'your command'); SwapVectors; If DosError <>0 then whatever; ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
Technical Details
Message-ID:
<1990Sep9.063941.27673@uwasa.fi>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!news.funet.fi!uwasa.fi!tsReferences:
<1990Sep7.144359.25202@jarvis.csri.toronto.edu> <eJB8o4w163w@mudos.ann-arbor.mi.us>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!eru!hagbard!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi LASK) Newsgroups: comp.os.msdos.programmer Subject: Re: MS-DOS EXEC Question Message-ID: <1990Sep9.063941.27673@uwasa.fi> Date: 9 Sep 90 06:39:41 GMT References: <1990Sep7.144359.25202@jarvis.csri.toronto.edu> <eJB8o4w163w@mudos.ann-arbor.mi.us> Organization: University of Vaasa Lines: 29