[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) |
Date: |
Mon, 19 Sep 2016 11:19:10 +0100 |
On 19 September 2016 at 10:46, Laurent Vivier <address@hidden> wrote:
> -----------------------------------------------------------------------
> Portability note: Some non-POSIX systems use different conventions for
> exit status values. For greater portability, you can use the macros
> EXIT_SUCCESS and EXIT_FAILURE for the conventional status value for
> success and failure, respectively. They are declared in the file stdlib.h.
The only non-POSIX system we support is mingw32, which also uses 0/1
for its exit codes.
The POSIX rationale for exit() also notes that EXIT_SUCCESS is
required to be 0.
Personally I think we should:
* definitely fix the "exit(-1)" and other exit-with-negative-number
bugs in the codebase
* possibly add a checkpatch check for exit-with-negative-constant-arg
If we're going to do anything else then maybe we could change
the EXIT_SUCCESS/EXIT_FAILURE instances in the codebase, but
really I think there are more important inconsistencies to
address (like all the unconverted non-QOM devices).
thanks
-- PMM
- [Qemu-devel] [PATCH 22/26] blockdev: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), (continued)
- [Qemu-devel] [PATCH 22/26] blockdev: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 16/26] s390: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 23/26] core: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), no-reply, 2016/09/16
- Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Peter Maydell, 2016/09/16
Re: [Qemu-devel] [PATCH 00/26] trivial: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Daniel P. Berrange, 2016/09/16