All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Kenneth Lorber <keni@his.com>, git@vger.kernel.org
Subject: Re: bug & patch: exit codes from internal commands are handled incorrectly
Date: Thu, 18 Dec 2014 18:43:15 +0100	[thread overview]
Message-ID: <54931233.6080900@web.de> (raw)
In-Reply-To: <885593BD-3024-4811-83A5-D3A0C4CE6AC1@his.com>

On 18.12.14 03:15, Kenneth Lorber wrote:
> The situation is actually slightly more complex than I stated previously.  From the docs:
>   The exit value of this program is negative on error,
> But there’s no such thing as a negative error code under Unix, so (at best) that will be exit(255).
> 
> No patch, because this is getting painfully close to needing someone with a global view of the code to fix.
> 
> Thanks,
> Keni
> 
My spontanous question:
Would it be save to clamp at 127 ?

>> +       if (status > 127)
>> +               status = 127;   /* prevent exit() from truncating to 0 or becoming negative */


(And the rest looked good enough to become a patch, 
or at least to start a wider discussion)

  reply	other threads:[~2014-12-18 17:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 19:28 bug & patch: exit codes from internal commands are handled incorrectly Kenneth Lorber
2014-12-18  2:15 ` Kenneth Lorber
2014-12-18 17:43   ` Torsten Bögershausen [this message]
2014-12-18 19:18   ` Junio C Hamano
2014-12-20 12:39     ` Kenneth Lorber
2015-02-01 22:32     ` Kenneth Lorber
2015-04-01  0:10       ` Kenneth Lorber
2015-04-01  0:40         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54931233.6080900@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=keni@his.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.