I don't know what your problem exactly is, but the "many zombies" problem
probably comes from the fact that killing children is necessary but not enough.
You need to explicitly wait for their termination (try "man 2 wait").


   Antoine.

----- Original Message ----- From: "Darren Cook" <[EMAIL PROTECTED]>
To: "GNU Go development" <[email protected]>
Sent: Saturday, March 19, 2005 4:24 AM
Subject: Re: [gnugo-devel] GTP sometimes fails



It is failing on set_random_seed, which is the first command after
getting the connection. Specifically it fails on my 3rd unit test -

It worked (tested by doing my 3 tests 100 times) by adding a usleep(1); after my fwrite() command and before doing the fgets() call.

I also now explicitly kill the child pid when I disconnect, but as far
as I can tell that made no difference: ps still shows 300 [gnugo
<defunct>] zombies, but they all disappear when my program closes.

I guess my usleep() is a kludge and the real problem is how I connect or
disconnect. But as multiple connect/disconnects is probably only going
to happen in my unit tests it is good enough.

Darren


_______________________________________________ gnugo-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnugo-devel




_______________________________________________ gnugo-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnugo-devel

Reply via email to