This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdbserver, errno handling in my_waitpid
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>, Doug Evans <dje at google dot com>, dan at codesourcery dot com
- Date: Wed, 10 Mar 2010 21:29:58 +0000
- Subject: Re: [RFA] gdbserver, errno handling in my_waitpid
- References: <4B980E29.5090208@vmware.com>
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?
--
Pedro Alves