From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13560 invoked by alias); 10 Mar 2010 21:48:19 -0000 Received: (qmail 13552 invoked by uid 22791); 10 Mar 2010 21:48:17 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Mar 2010 21:48:13 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 2B4BF1310B; Wed, 10 Mar 2010 13:48:12 -0800 (PST) Received: from [10.20.124.100] (promd-2s-dhcp100.eng.vmware.com [10.20.124.100]) by mailhost4.vmware.com (Postfix) with ESMTP id 20C8BC9A19; Wed, 10 Mar 2010 13:48:12 -0800 (PST) Message-ID: <4B98139B.6080202@vmware.com> Date: Wed, 10 Mar 2010 21:48:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" , Doug Evans , "dan@codesourcery.com" Subject: Re: [RFA] gdbserver, errno handling in my_waitpid References: <4B980E29.5090208@vmware.com> <201003102129.58617.pedro@codesourcery.com> In-Reply-To: <201003102129.58617.pedro@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00398.txt.bz2 Pedro Alves wrote: > On Wednesday 10 March 2010 21:24:57, Michael Snyder wrote: >> This is not really my most familiar bit of the code, so >> you gdbserver guys check me, ok? >> >> It seems to me that we need to set errno to zero before calling waitpid, >> if we're going to check it right after. Especially the second time. > > I don't think do; we only check it if waitpid returns -1, and > in that case, waitpid should have changed errno itself. Or > have you found an actual problem here? > No, I guess you're right -- it just looked suspicious to me.