From: "Rafał Maj" Newsgroups: comp.os.msdos.djgpp Subject: Re-start program ? Date: Sun, 17 Sep 2000 23:33:15 +0200 Organization: Academic Computer Center CYFRONET AGH Lines: 29 Message-ID: <8q3d8e$ria$1@info.cyf-kr.edu.pl> NNTP-Posting-Host: d-94-53-17.cyfronet.krakow.pl X-Trace: info.cyf-kr.edu.pl 969226318 28234 149.156.1.177 (17 Sep 2000 21:31:58 GMT) X-Complaints-To: news AT cyf-kr DOT edu DOT pl NNTP-Posting-Date: 17 Sep 2000 21:31:58 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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 :) But how to do it ? It'll be hard for program to close, and then run it self again I think... But maybe program that will in loop run main EXE program will be better ? Like : bool done=0; while (!done) { swap*** // ??? done = read_from_some_disk_file(); } If my main program will want to re-init memory, program will just exit. If I'll realy to quit program, then main program will write some information to disk file, to tell caller-program to quit. My questions : >>>>>> 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" ? >>>>>> What do you think about my idea ? Thanks, Rafal