Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!eurtrx!euraiv1!reino From: reino@cs.eur.nl (Reino de Boer) Newsgroups: comp.lang.pascal Subject: Re: Process handling/Memory and Ctrl-C Message-ID: <1991Jan16.074435.28176@cs.eur.nl> Date: 16 Jan 91 07:44:35 GMT References: <950053@hpclapd.cup.hp.com> Organization: Erasmus Universiteit Rotterdam, dept. CS (Informatica) Lines: 40 defaria@hpclapd.cup.hp.com (Andy DeFaria) writes: >Why do I get the following error messages? The following program allocates >the smallest stack possible (1024) then Exec's SORT. I then hit Control-C >to abort the SORT operation and fail with the following two errors: >Runtime error 202 at 0010:09B9 { 202 = Stack overflow error } >Runtime error 105 at 0000:00D8 { 105 = File not open for output } >{$M 1024, 0, 0} >Program Foo; >Uses DOS; >Begin { Foo } > WriteLn ('Executing C:\SYSTEM\DOS\SORT.EXE'); > > Exec ('C:\SYSTEM\DOS\SORT.EXE'); My compiler warns me that I should have a second parameter. like: Exec ('C:\SYSTEM\DOS\SORT.EXE',''); > If DOSError <> 0 then > WriteLn ('DOSError = ', DOSError : 1) > else > WriteLn ('Successful'); >End. { Foo } But, more importantly, you need the following calling sequence: SwapVectors; Exec( ... ); SwapVectors; In which case all goes well (RTFM). Reino -- Reino R. A. de Boer "We want to build the right product right, right?" Erasmus University Rotterdam ( Informatica ) e-mail: reino@cs.eur.nl