How to capture error in Cygwin, $? is not working

Eric Blake ebb9@byu.net
Thu Mar 13 12:02:00 GMT 2008


-----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@byu.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/



More information about the Cygwin mailing list