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
signature.asc
Description: OpenPGP digital signature