From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: EINTR in procfs_wait Date: Fri, 13 Apr 2001 06:53:00 -0000 Message-id: <3AD70404.F37729DA@redhat.com> References: <3AD32106.12A0443E@redhat.com> <3AD4EC75.C2C1DF5E@cygnus.com> X-SW-Source: 2001-04/msg00135.html Michael Snyder wrote: > > Fernando Nasser wrote: > > > > Folks, > > > > 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. > > OK, I've looked at the old procfs module, and it did indeed have a similar > test in a similar (though not identical) context. The change makes sense > to me. Fernando, do you want to do the honors? > I checked Adam's patch in. Fernando > > > > Thanks in advance. > > > > Fernando > > > > 2001-04-05 Adam Mirowski > > > > 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. > > > > Index: gdb/procfs.c > > ------- 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", > > inferior_pid, retval); > > /* 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; > > else > > { > > /* Unknown error from wait_for_stop. */ > > proc_error (pi, "target_wait (wait_for_stop)", __LINE__); > > } > > } > > else -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9