Date: Sun, 23 Sep 2001 12:32:12 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Piotr Fusik 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: 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 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.