delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/31/15:18:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <424C5B92.75F5F16@dessent.net>
Date: Thu, 31 Mar 2005 12:20:34 -0800
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: More error level issues
References: <NDBBLEGOCELADMPKABOKAEAEFLAB DOT wien AT avt DOT at>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

AVT-Wien wrote:

> With cygwin1.dll version 1.5.13 exit codes to Windows (I use W2K and XP) have
> changed by a factor of 256 (shift of 8 bits) as mentioned in the 2 messages
> cited below. I have processes running under Windows shells that run several
> days, doing a lot of steps (both unix tools like gawk, head, sort etc. and gcc
> compiled c-programs) fully automatically. Flow control heavily relies on return
> codes (%errorlevel% in Windows). The codes were introduced according to the
> exit codes of the previous versions of the cygwin-libraries that put into
> %errorlevel% exactly what was provided by exit(). With the upgrade to 1.5.13
> the exit codes changed by a factor of 256, and since Windows XP uses 16 bit
> codes, are now limited to a maximum value of 255.

The change was reverted several weeks ago:
<http://sources.redhat.com/ml/cygwin/2005-03/msg00350.html>

> By the way, does anybody around know a workaround - or have an idea - how to
> get the exit codes stripped off the 8 least significant bits without changing
> the *.bat-files in Windows XP? And eventually even get back values higher than
> 255?

I'm not quite sure what you're talking about here because there is no
such thing in unix as an exit value greater than 255.  After the
2005-03-08 revert (and prior to 1.5.13) you will never see an errorlevel
outside of the range 0-255 for a cygwin application that was called from
a windows app.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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