From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76625 invoked by alias); 23 Sep 2016 20:37:08 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 76613 invoked by uid 89); 23 Sep 2016 20:37:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=U*fw, sk:fwdene, D*enyo.de, sk:fw@dene X-HELO: albireo.enyo.de From: Florian Weimer To: Adhemerval Zanella Cc: Rasmus Villemoes , libc-alpha@sourceware.org, Joseph Myers Subject: Re: [PATCH] linux: spawni.c: simplify error reporting to parent References: <877fa6nwsl.fsf@mid.deneb.enyo.de> <1474405260-16657-1-git-send-email-rv@rasmusvillemoes.dk> <87twd7jio2.fsf@mid.deneb.enyo.de> <871t0asaa0.fsf@rasmusvillemoes.dk> Date: Fri, 23 Sep 2016 20:37:00 -0000 In-Reply-To: (Adhemerval Zanella's message of "Fri, 23 Sep 2016 16:28:25 -0300") Message-ID: <87y42i9wuz.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-09/txt/msg00504.txt.bz2 * Adhemerval Zanella: > On 23/09/2016 16:09, Rasmus Villemoes wrote: >> On Fri, Sep 23 2016, Florian Weimer wrote: >>=20 >>> * Rasmus Villemoes: >>> >>>> + ec =3D args.err; >>>> + assert (ec >=3D 0); >>>> + if (ec !=3D 0) >>>> + __waitpid (new_pid, NULL, 0); >>> >>> One minor issue: Now that the variable name =E2=80=9Cec=E2=80=9D appear= s in an >>> assertion, it is a good idea to rename it to =E2=80=9Cerror_code_from_c= hild=E2=80=9C >>> or something similar, so that the assertion message is more >>> meaningful. >>=20 >> IMO, that's already addressed by the comments above the initialization >> in the parent and exit path in the child. An assert message would have >> to be overly verbose to make sense without the context of the code it >> appears in. In any case, error_code_from_child is a bad name if we hit >> the "ec =3D -new_pid" branch. > > Also, if CLONE_VM is not really creating a thread with shared VM it means > something really broken in the system. Agreed. I have no objections anymore to the patch as-is.