qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE)
Date: Fri, 16 Sep 2016 10:39:21 -0500	[thread overview]
Message-ID: <867362ee-e86d-8610-f8f4-5aeb52ff362e@redhat.com> (raw)
In-Reply-To: <20160916152704.GD9654@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1088 bytes --]

On 09/16/2016 10:27 AM, Daniel P. Berrange wrote:
> On Fri, Sep 16, 2016 at 03:55:51PM +0200, Laurent Vivier wrote:
>> This series is the result of coccinelle patch
>> scripts/coccinelle/exit.cocci
>> provided by the first patch of the series.
>>
>> It replaces exit(0) by exit(EXIT_SUCCESS)
>> and exit(1) by exit(EXIT_FAILURE).
> 
> Some places use '_exit' and should have had the same
> change applied AFAICT.

And _Exit(), if we use it.

> 
>> All other exit() are not modified as we don't want
>> to change the behavior.
> 
> IMHO, modifying the other exit() calls is precisely
> what would make this series useful.
> 
> eg there's a bunch of places which arbitrarily use
> '-1' instead of '1' as the value for no good reason.

What's more, exit(-1) is awful to use; it results in an exit status of
255 due to truncation on Linux; and further has weird effects on
xargs(1) (which special-cases a status of 255, differently than a status
of 1).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      reply	other threads:[~2016-09-16 15:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 13:55 [Qemu-trivial] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 01/26] coccinelle: " Laurent Vivier
2016-09-16 15:35   ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 02/26] arm: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 03/26] cris: " Laurent Vivier
2016-09-16 14:41   ` Edgar E. Iglesias
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 04/26] block: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 05/26] ppc: " Laurent Vivier
2016-09-19  5:22   ` David Gibson
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 06/26] graphics: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 07/26] tests: " Laurent Vivier
2016-09-16 13:55 ` [Qemu-trivial] [PATCH 08/26] replay: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 09/26] qemu-user: " Laurent Vivier
2016-09-21 19:21   ` Riku Voipio
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 10/26] m68k: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 11/26] pci, virtio: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 12/26] sparc: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 13/26] sh4: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 14/26] x86: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 15/26] mips: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 16/26] s390: " Laurent Vivier
2016-09-19 11:07   ` Cornelia Huck
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 17/26] tcg: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 18/26] posix: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 19/26] alpha: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 20/26] common: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 21/26] misc machine: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 22/26] blockdev: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 23/26] core: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 24/26] error, trace: " Laurent Vivier
2016-09-16 15:55   ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 25/26] hw: " Laurent Vivier
2016-09-16 13:56 ` [Qemu-trivial] [PATCH 26/26] net: " Laurent Vivier
2016-09-16 14:41 ` [Qemu-trivial] [Qemu-devel] [PATCH 00/26] trivial: " no-reply
2016-09-16 14:47 ` Peter Maydell
2016-09-16 15:39   ` Daniel P. Berrange
2016-09-16 15:45     ` Peter Maydell
2016-09-19  9:21       ` Markus Armbruster
2016-09-19  9:46       ` Laurent Vivier
2016-09-19 10:19         ` Peter Maydell
2016-09-19 10:32       ` Cornelia Huck
2016-09-16 15:27 ` Daniel P. Berrange
2016-09-16 15:39   ` Eric Blake [this message]

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=867362ee-e86d-8610-f8f4-5aeb52ff362e@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).