This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] linux: spawni.c: simplify error reporting to parent
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Rasmus Villemoes <rv at rasmusvillemoes dot dk>
- Cc: libc-alpha at sourceware dot org, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Fri, 23 Sep 2016 07:21:01 +0200
- Subject: Re: [PATCH] linux: spawni.c: simplify error reporting to parent
- Authentication-results: sourceware.org; auth=none
- References: <877fa6nwsl.fsf@mid.deneb.enyo.de> <1474405260-16657-1-git-send-email-rv@rasmusvillemoes.dk>
* Rasmus Villemoes:
> + ec = args.err;
> + assert (ec >= 0);
> + if (ec != 0)
> + __waitpid (new_pid, NULL, 0);
One minor issue: Now that the variable name “ec” appears in an
assertion, it is a good idea to rename it to “error_code_from_child“
or something similar, so that the assertion message is more
meaningful.