I’m trying to find a good and simple method to signal child processes
(created through SocketServer with ForkingMixIn) from the parent
process.
While Unix signals could be used, I want to avoid them since only
children who are interested should receive the signal, and it would be
overkill and complicated to require some kind of registration
mechanism to identify to the parent process who is interested.
(Please don’t suggest threads, as this particular program won’t work
with threads, and thus has to use forks.)
Since you are on a unix system, semaphores should be the easy answer.
Unfortunately, python does not seem to offer a way to call the semop system call.
If you are using python 2.6 , you may be able to use the
multiprocessing module Condition class.