delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/23/05:35:15

Date: Sun, 23 Sep 2001 12:32:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Piotr Fusik <pfusik AT poczta DOT onet DOT pl>
cc: djgpp AT delorie DOT com
Subject: Re: Exit code of a .COM program is always zero?
In-Reply-To: <001701c14280$89ead440$26d24dd5@piec>
Message-ID: <Pine.SUN.3.91.1010923122907.14021A-100000@is>
MIME-Version: 1.0
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

On Fri, 21 Sep 2001, Piotr Fusik wrote:

> redir -x test.com (Redir 2.1) prints "Exit code: 0".
> test.com returns a non-zero code, as show:

Thanks for reporting this.

This happens due to a subtle bug in one of the subroutines called by the 
library function `system', so it is not specific to `redir'.  The bug 
causes *.com programs to be invoked via COMMAND.COM instead of directly, 
and COMMAND.COM always returns a zero exit status, no matter what.  The 
bug only happens on systems which support long file names.

This is already fixed in the current development sources, so the next 
DJGPP release will not have this problem.

- Raw text -


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