delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=R0N8 | |
2wKRHjZVnJQz0Wj7Is3w9f7PpDKLatW/2noS4comvuMM3fwUJvBXfG1EFfl1bbky | |
O9rw07jXIG+2GDPkEznysnosp/54bVGsXXSuFdkPd8T/k04LK5iZ0i5GpjsjcUX/ | |
R5JlrdbGKdsJYm+HuPf3aj6QSXNOIn0HM/L3C/Y= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=tNvBKgtIQZ | |
GpqVrzq3te+X/SOxo=; b=VJuTArOcZmlwmcZL5JR2wgZLuOQZRFr6dSWujUdMuE | |
fsyQrJc+YMrRJm2z7PLknDL+xFNMgBVV01K9dmEjLfGBke15U/IQ8tZEJLxiNsB4 | |
/FIijUZ/VUqlMi0xX/BXnN6g/AyGwLwal/fGMU7IysB61pzvdtzF3jNXWWdQZCQC | |
8= | |
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 |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=headed, Hx-languages-length:1677, states, WILL |
X-HELO: | mx1.redhat.com |
Subject: | Re: windows exit codes truncated to 1 Byte |
To: | cygwin AT cygwin DOT com |
References: | <1233154500 DOT 205789 DOT 1459429282664 DOT JavaMail DOT yahoo DOT ref AT mail DOT yahoo DOT com> <1233154500 DOT 205789 DOT 1459429282664 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT com> <56FD268D DOT 4060904 AT gmx DOT de> <56FD413A DOT 9050502 AT redhat DOT com> <20160331185002 DOT GA3353 AT calimero DOT vinschen DOT de> |
From: | Eric Blake <eblake AT redhat DOT com> |
Openpgp: | url=http://people.redhat.com/eblake/eblake.gpg |
Message-ID: | <56FD7349.70003@redhat.com> |
Date: | Thu, 31 Mar 2016 12:58:17 -0600 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
MIME-Version: | 1.0 |
In-Reply-To: | <20160331185002.GA3353@calimero.vinschen.de> |
X-IsSubscribed: | yes |
--6m4wq9jXSwBIfM9o9nohrrEHdc4J1BVRM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/31/2016 12:50 PM, Corinna Vinschen wrote: > On Mar 31 09:24, Eric Blake wrote: >> On 03/31/2016 07:30 AM, Bj=C3=B6rn Stabel wrote: >>> Am 31.03.2016 um 15:01 schrieb Cristian: >>>> I noted that exit codes returned by CMD and other apps (msiexec) are t= runcated to 1 byte (0 .. 255). >> >> This matches Linux, but not POSIX. >=20 > Why? Does bash use waitid? Not yet, but with the link I referred to below, the thought is that eventually bash WILL use waitid(), based on the direction POSIX is headed in. > But... >=20 >>> POSIX specifies that the lower 8 bits of the exit status be made >>> available to the caller of wait/waitpid: >>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html >> >> Correct: wait() and waitpid() can only return 8 bits; but POSIX states >> that waitid() MUST be able to access all 32-bits untruncated; this is >> where Linux gets it wrong (Linux truncates during exit(), so waitid() >> can only return 8 bits; other operating systems do NOT truncate during >> exit, but preserve all 32 bits; if you use wait() or waitpid() you only >> get 8 bits, but if you use waitid() you can see the full 32 bits). >=20 > ...that only makes sense if we implement waitid at all. SHTDI and all > that... Right - without waitid(), it's fairly obvious that cygwin isn't quite up to POSIX compliance yet :) And indeed, patches are welcome, if someone who cares enough about more than 8 bits wants to step up and write it (personally, I don't care enough as long as Linux is still truncating early during exit()). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --6m4wq9jXSwBIfM9o9nohrrEHdc4J1BVRM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW/XNJAAoJEKeha0olJ0Nq2skH/25do+nIwHmRtAoIgw/c9Noy vIGKbG19zczuiekDRHlFbg8Dy05eufE9Ptp8XlsEPgzkrSbRst9RDfPHrawJWh9y SQs6VTOWICwz+f0kai1C5ar29VR3XUvptT5oqigmr87wn6U2pYVWqtF4RV6rVWxX MiCLsbqyU16rSReSdn8BOdKQ80w4eC23ribicPQKS1lqgefzF9BSUxoJ2x0hJX1M 2Hh5wOG3ihGvhr8ohKjzWp7yaXHwcC0HNANL3Tqxqn8IgYb6HiHAPLxVZkKx6c+0 e09jUlomvZyFPxrXk+hF61MQ199pDp8LRyaIMz41tTqFjqY4+DkEULE7QPDRR74= =lKRX -----END PGP SIGNATURE----- --6m4wq9jXSwBIfM9o9nohrrEHdc4J1BVRM--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |