delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/23/14:20:32

Date: Sun, 23 Aug 1998 17:19:29 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: M Joshua Ryan <s1002145 AT admiral DOT umsl DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Can a DOS Console App close its own window?
In-Reply-To: <35DBBE0C.9F45C70E@admiral.umsl.edu>
Message-ID: <Pine.SUN.3.91.980823171904.1451a-100000@is>
MIME-Version: 1.0

On Thu, 20 Aug 1998, M Joshua Ryan wrote:

> I haven't tested this, but you could try
> 
> system("exit");

You *should* have tested that, because it doesn't work.  The code you
suggest will have no effect, since the EXIT command at most causes the
*inferior* shell to terminate, but it does nothing to the *parent*
shell from which the calling program was invoked.

In fact, DJGPP's version of `system' knows that EXIT has no effect, so
it doesn't even invoke an inferior shell, it just returns immediately
to the caller.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019