rda/unix/ChangeLog:

	* lwp-pool.c (lwp_pool_stop_all): Check status of kill_lwp() and
	handle dead threads.

Index: ./rda/unix/lwp-pool.c
===================================================================
RCS file: /cvs/cvsfiles/devo/rda/unix/Attic/lwp-pool.c,v
retrieving revision 1.1.4.1
diff -u -p -r1.1.4.1 lwp-pool.c
--- ./rda/unix/lwp-pool.c	3 Dec 2004 23:43:12 -0000	1.1.4.1
+++ ./rda/unix/lwp-pool.c	25 Jun 2005 00:00:22 -0000
@@ -1123,9 +1123,27 @@ lwp_pool_stop_all (void)
 	    case lwp_state_running:
 	      /* A 'no such process' error here indicates an NPTL thread
 		 that has exited.  */
-	      kill_lwp (l->pid, SIGSTOP);
-	      l->state = lwp_state_running_stop_pending;
-	      queue_enqueue (&stopping_queue, l);
+	      if (kill_lwp (l->pid, SIGSTOP) < 0)
+		{
+		  /* Thread has exited.  See if a status is available.  */
+		  if (wait_and_handle (l, WNOHANG) < 0)
+		    {
+		      /* Nope, it's truly gone without providing a status.
+		         Put it on the interesting queue so that GDB is
+			 notified that it's gone.  */
+		      hash_delete (l);
+		      l->state = lwp_state_dead_interesting;
+		      l->status = 0;
+		      if (l->next)
+			queue_delete (l);
+		      queue_enqueue (&interesting_queue, l);
+		    }
+		}
+	      else
+		{
+		  l->state = lwp_state_running_stop_pending;
+		  queue_enqueue (&stopping_queue, l);
+		}
 	      break;
 
 	    case lwp_state_stopped: