Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: EINTR in procfs_wait
@ 2001-04-10  8:08 Fernando Nasser
  2001-04-10 14:57 ` Kevin Buettner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Fernando Nasser @ 2001-04-10  8:08 UTC (permalink / raw)
  To: gdb-patches

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.

Thanks in advance.

Fernando



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.


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-04-13  6:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-10  8:08 RFA: EINTR in procfs_wait Fernando Nasser
2001-04-10 14:57 ` Kevin Buettner
2001-04-10 17:41   ` Fernando Nasser
2001-04-11 16:43   ` Michael Snyder
2001-04-11 11:13 ` Andrew Cagney
2001-04-11 16:45 ` Michael Snyder
2001-04-13  6:53   ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox