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]

Re: Patch: FYI: ignore unknown children when reaping


Cédric Berger wrote:
Hi Tom,

On Thu, 2006-01-05 at 10:26 -0700, Tom Tromey wrote:
// 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);
- }
}

So how/when does this happen? And why isn't it an error?

1) Java Code create process A 2) Process A create process B 3) Process A exits (while process B still runs) => Process B is now a direct child of Java code 4) Process B exits.

Oops, forget about that e-mail.


I think that in that scenario, Process B become child of init(1)

Sorry for the noise.

Cedric



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