This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix build problem with system call in compile/compile.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]