From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3943 invoked by alias); 9 Jan 2015 10:46:25 -0000 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 Received: (qmail 3926 invoked by uid 89); 9 Jan 2015 10:46:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: us-alimail-mta1.hst.scl.en.alidc.net Received: from mail113-248.mail.alibaba.com (HELO us-alimail-mta1.hst.scl.en.alidc.net) (205.204.113.248) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Jan 2015 10:46:13 +0000 X-Alimail-AntiSpam:AC=CONTINUE;BC=0.1178323|-1;FP=0|0|0|0|0|-1|-1|-1;HT=r41g03019;MF=gang.chen@sunrus.com.cn;PH=DS;RN=7;RT=7;SR=0; Received: from ShengShiZhuChengdeMacBook-Pro.local(mailfrom:gang.chen@sunrus.com.cn ip:124.127.118.42) by smtp.aliyun-inc.com(10.147.34.62); Fri, 09 Jan 2015 18:43:04 +0800 Message-ID: <54AFB275.9060803@sunrus.com.cn> Date: Fri, 09 Jan 2015 10:46:00 -0000 From: Chen Gang S User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Pedro Alves , sellcey@imgtec.com CC: Jan Kratochvil , "Maciej W. Rozycki" , Joel Brobecker , gdb-patches@sourceware.org, Yao Qi Subject: Re: [Patch] Fix build problem with system call in compile/compile.c References: <20150106041615.GJ5445@adacore.com> <1420560255.15691.21.camel@ubuntu-sellcey> <20150107041351.GN5445@adacore.com> <1420655766.15691.44.camel@ubuntu-sellcey> <54AD8A76.9010702@redhat.com> <20150108211229.GA5634@host2.jankratochvil.net> <1420755123.2630.21.camel@ubuntu-sellcey> <54AF1118.2070707@redhat.com> <1420762209.2630.27.camel@ubuntu-sellcey> <54AF50E4.3080901@sunrus.com.cn> <54AFA92C.8010108@redhat.com> In-Reply-To: <54AFA92C.8010108@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00211.txt.bz2 On 1/9/15 18:10, Pedro Alves wrote: > On 01/09/2015 03:54 AM, Chen Gang S wrote: >> >> Excuse me, I guess, I can not check in, welcome any other members help to >> check in for me. > I was going to apply it as is, but I recalled that the return > of "system" is really a 'wait' status: > >> + if (system (zap)) >> + warning (_("Could not remove temporary directory %s"), dir); > > so I tweaked the patch accordingly, and pushed it, as below. [...] > - system (zap); > + wstat = system (zap); > + if (wstat == -1 || !WIFEXITED (wstat) || WEXITSTATUS (wstat) != 0) > + warning (_("Could not remove temporary directory %s"), dir); Oh, really it is. Thanks. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed