This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: ignore unknown children when reaping


I'm checking this in on the trunk and the 4.1 branch.

One Fedora user noticed that eclipse printed messages about reaping
unknown children during startup.  This was being printed by
libgcj... but there is no reason to do this.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/lang/natPosixProcess.cc (reap): Ignore unknown children.

Index: java/lang/natPosixProcess.cc
===================================================================
--- java/lang/natPosixProcess.cc	(revision 109293)
+++ java/lang/natPosixProcess.cc	(working copy)
@@ -1,6 +1,6 @@
 // natPosixProcess.cc - Native side of POSIX process code.
 
-/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -170,6 +170,8 @@
       // Look up the process in our pid map.
       ConcreteProcess * process = removeProcessFromMap ((jlong) pid);
 
+      // Note that if process==NULL, then we have an unknown child.
+      // This is not common, but can happen, and isn't an error.
       if (process)
 	{
 	  JvSynchronize sync (process);
@@ -178,11 +180,6 @@
           process->processTerminationCleanup();
 	  process->notifyAll ();
 	}
-      else
-	{
-	  // Unknown child.  How did this happen?
-	  fprintf (stderr, "Reaped unknown child pid = %ld\n", (long) pid);
-	}
     }
 
 error:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]