Python destructor not called
<p>Anyone has any idea how to get my destructor called on object destruction?</p>

<pre><code>def __del__(self):
    os.unlink(self.pidfile)
</code></pre>

<p>Scenario: There is a Daemon that runs Process. Daemon gets a SIGTERM, and immediately sends a SIGTERM to Process. Process stops execution without <code>__del__</code> called.</p>