This is the mail archive of the
mailing list for the GDB project.
RFA: EINTR in procfs_wait
- To: gdb-patches at sources dot redhat dot com
- Subject: RFA: EINTR in procfs_wait
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Tue, 10 Apr 2001 11:04:38 -0400
- Organization: Red Hat Canada
I got this patch and it seems that we did forget to test for EINTR in
procfs_wait(). It looks like an "obvious fix" but I would like someone
else to double check it.
Thanks in advance.
2001-04-05 Adam Mirowski <Adam.Mirowski@Sun.COM>
Fixed Insight on Solaris. It was not possible to debug a process
because of EINTR "errors".
* procfs.c: (procfs_wait): if proc_wait_for_stop() fails
with EINTR, retry the call.
------- procfs.c -------
*** /tmp/dMKayx_ Tue Apr 10 16:20:54 2001
--- procfs.c Thu Apr 5 22:21:40 2001
*** 3518,3531 ****
--- 3518,3533 ----
if (retval != PIDGET (inferior_pid)) /* wrong child? */
error ("procfs: couldn't stop process %d: wait returned %d\n",
/* FIXME: might I not just use waitpid?
Or try find_procinfo to see if I know about this child? */
+ else if (errno == EINTR)
+ goto wait_again;
/* Unknown error from wait_for_stop. */
proc_error (pi, "target_wait (wait_for_stop)", __LINE__);