Date: Tue, 26 Sep 2000 15:21:07 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Rafał Maj cc: djgpp AT delorie DOT com Subject: Re: Re-start program ? In-Reply-To: <8q3d8e$ria$1@info.cyf-kr.edu.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 17 Sep 2000, Rafa=B3 Maj wrote: > I think, that the best way to defragment all memory, and make all memory > again available (in case of any memory leeks) is to... exit program & run= it > again :) >=20 > But how to do it ? You can't. DJGPP doesn't support this mode of program restart. > If I'll realy to quit program, then main program will write some informat= ion > to disk file, to tell caller-program to quit. To make this work in a real-life application, you will have to save=20 memory contents and file handles that existed in the program before you=20 exited, and then restore those when the program is restarted. There's no= =20 library function which does that, so unless you do all this in your own=20 code (lots of it ;-), it won't work. It's much easier to find all those memory leaks and correct them. And=20 you get a better program as a bonus ;-) > >>>>>> Ther are so many spawn*** functions... Witch to call, how to call = it, > when main program name is "main.exe" and arguments are "1st" and "2nd" ? As far as I could see, the Info page for the "spawn*" functions includes=20 an example.