Mark and Sidnei, question for you.  I work on ZRS, which, alas, I
can't pass out code for.  Its Windows service drivers subclass the
Service class in Zope's nt_svcutils/

I'm trying to build a new ZRS release.  Trying to stop the ZRS service
now "suddenly and for no reason at all" <wink> logs an error, because
I believe its onStop() method is getting called twice now, but used to
be called only once.  That's no good for ZRS, because its onStop
method makes a connection to a special "shutdown port", and ZRS proper
responds by shutting ZRS down.  The socket goes away along with it, so
trying to connect to the shutdown port a second time raises an

I'm not entirely sure why this didn't used to happen.  I'm guessing
that a stop request with the current code:

1. Triggers SvcStop, which calls onStop() and sets hWaitStop.
2. Setting hWaitStop in turn triggers the WaitForMultipleObjects in run(),
   and then that calls SvcStop again (which calls onStop() again).

Anyway, is this bug or feature?  If it's a feature, I can make the ZRS
subclass onStop() methods safe to call multiple times.  It doesn't
_feel_ like a feature, though <wink>.
Zope-Checkins maillist  -

Reply via email to