[Zope-Coders] Signal forwarding

Jeremy Hylton jeremy@alum.mit.edu
Wed, 9 Oct 2002 17:06:59 -0400


>>>>> "CM" == Chris McDonough <chrism@zope.com> writes:

  >> Yes, please!  Jeremy & I found at least one case where an attempt
  >> to close a storage from a signal handler could conceivably try to
  >> acquire a lock (when aborting a current transaction).

  CM> So the problem would be that if some other piece of code already
  CM> held the lock, it could result in deadlock?

That's right.  Take FileStorage as an example.  A bunch of its methods
acquire a lock on entry and release it on exit.  If any of these
methods is being executed when the signal handler executes, the
attempt to acquire the lock for pack will block forever.

Jeremy