www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/03/13/07:02:32

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=pd8qucvsIc4A:10 a=xe8BsctaAAAA:8 a=MTAT9-GZf-d0beXXrz0A:9 a=P_5oVBosV3yfeyuIF-leqsD3PaMA:4 a=eDFNAWYWrCwA:10 a=rPt6xJ-oxjAA:10
Message-ID: <47D917AD.5070105@byu.net>
Date: Thu, 13 Mar 2008 06:01:49 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, norliansyah AT gmail DOT com
Subject: Re: How to capture error in Cygwin, $? is not working
References: <16021741 DOT post AT talk DOT nabble DOT com>
In-Reply-To: <16021741.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to nlian on 3/13/2008 12:09 AM:
| What I don't understand is why $? return 0 and not 1060 or any other
| error code.

1060 is impossible - exit status is constrained to be 0 to 255 (8 bits is
all you get).  And while 1060%256 == 36 would be nicer, that fix would
have to come from Microsoft, not cygwin.  We have no control over their
lousy programming practices, including when their tools give an exit
status of 0 even when displaying a failure message.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfZF6wACgkQ84KuGfSFAYBdQgCdHbQ3lL2YYebeCo85Gq0JDAHE
tDQAnjVGnMTQC9Ety8oifk8kIF/zUaNy
=lsYE
-----END PGP SIGNATURE-----

--
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