Return codes over 1 byte

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jul 10 08:28:00 GMT 2015


On Jul  9 20:20, Michael DePaulo wrote:
> On Thu, Jul 9, 2015 at 7:42 PM, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
> > On Thu, 2015-07-09 at 19:30 -0400, Michael DePaulo wrote:
> >> mark06 mentioned this on IRC today and then left the channel about 1 hour later:
> >>
> >> <mark06> has anyone ever discussed exit codes above one byte? they are
> >> valid on modern windows, but cygwin's bash will mess them
> >>
> >> I was curious, so I googled it (I could not find an answer) and then
> >> tried it out. I can confirm the what he said.
> >
> > http://pubs.opengroup.org/onlinepubs/9699919799/functions/exit.html
> > https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
> >
> > --
> > Yaakov
> 
> Right, only the least significant 8 bits are outputted. So "257" becomes "1".
> 
> I thought I read somewhere that the Cygwin mintty terminal + bash
> shell is supposed to be suitable for running native windows apps.
> Maybe I was thinking of the 1st paragraph on this page after the list
> of features:
> https://code.google.com/p/mintty/
> 
> Or maybe I was thinking about this reply:
> https://cygwin.com/ml/cygwin/2007-03/msg00758.html
> 
> Either way, I feel like this should be documented somewhere. Perhaps I
> should submit a patch to add a section like "return codes" to to this
> page?
> https://cygwin.com/cygwin-ug-net/using-effectively.html
> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/doc/effectively.xml

Feel free.  Please send patches to the cygwin-patches ML.  While you're
at it, you might want to scratch the entire section called "Cygwin and
Windows Networking".  It's so 20th century...


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150710/72fd3f54/attachment.sig>


More information about the Cygwin mailing list