On Aug 4, 2008, at 3:04 PM, Kyle Wheeler wrote:
The issue, I think, is that maildirlock has a race condition. There is no guarantee that the parent has set up its signal handlers before the child gets around to killing it.
Oh, you're right.
I think signals are probably a bad way of handling this inter- process communication. How about using a pipe? I've attached a patch that seems to work.
It would have been possible to also set up the signal handlers before the forking, but on OS X I seem to be getting the SIGCHLD signal before the SIGTERM.. So I changed the code to use a pipe: http://hg.dovecot.org/dovecot-1.1/rev/635a988626d0
PGP.sig
Description: This is a digitally signed message part