Received: from eggs.gnu.org ([2001:4830:134:3::10]:60969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkvEf-00077k-0f for qemu-devel@nongnu.org; Fri, 16 Sep 2016 11:39:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkvEb-00023V-1C for qemu-devel@nongnu.org; Fri, 16 Sep 2016 11:39:28 -0400 References: <1474034177-17663-1-git-send-email-lvivier@redhat.com> <20160916152704.GD9654@redhat.com> From: Eric Blake Message-ID: <867362ee-e86d-8610-f8f4-5aeb52ff362e@redhat.com> Date: Fri, 16 Sep 2016 10:39:21 -0500 MIME-Version: 1.0 In-Reply-To: <20160916152704.GD9654@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3Wn9q8uA465JeLa3uVJPKjoUbLXow6jI1" Subject: Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Laurent Vivier Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3Wn9q8uA465JeLa3uVJPKjoUbLXow6jI1 From: Eric Blake To: "Daniel P. Berrange" , Laurent Vivier Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Message-ID: <867362ee-e86d-8610-f8f4-5aeb52ff362e@redhat.com> Subject: Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) References: <1474034177-17663-1-git-send-email-lvivier@redhat.com> <20160916152704.GD9654@redhat.com> In-Reply-To: <20160916152704.GD9654@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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). >=20 > Some places use '_exit' and should have had the same > change applied AFAICT. And _Exit(), if we use it. >=20 >> All other exit() are not modified as we don't want >> to change the behavior. >=20 > IMHO, modifying the other exit() calls is precisely > what would make this series useful. >=20 > 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). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3Wn9q8uA465JeLa3uVJPKjoUbLXow6jI1 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/ iQEcBAEBCAAGBQJX3BIpAAoJEKeha0olJ0NqAI8H/j40D86NaD7hrDuxg8Tpej47 ghaykxDSANFYLeDg/0spBXityI/4WhYpwPVbnMIhCCkQFvYZL6BRDmtUTp1gUEJ9 9b8CNXnxAi51eSSfkP8jL8PR+FslDjUJ3mlgt66Gi4KN+Nqk62NT+o2XRYDV3ZSO nLGVasi8P84jHr5wN7R6DbXCaCfo/Cn82XTHTxZMLB9rZzIEzN5+biHuwAH0+U/v PffBvQmy8rgE6Dy9FY9x/yzlbrTl8XsheBaB7N2ZZSrUbW57gKKO5dI3DuC3g1pM 4bRw9xodX6ZNlMeUVBkGbY5tzCt5cHWEQ2em87qR+m9VE7PK0k3p7E4Vcmyi1As= =+ity -----END PGP SIGNATURE----- --3Wn9q8uA465JeLa3uVJPKjoUbLXow6jI1--