[Tutor] signal trapping in a class instance

dave selby dave6502 at googlemail.com
Sun Mar 16 00:15:18 CET 2008

Hi all,

I have a series of class instances saved in an array. I need the
instances to respond to a SIGKILL by writing to a file and

Am I right in codeing it as below ? ... does the sys.exit() kill the
instance or the instance & the instance holding array definition above
it ?



  def signal_kill(self, signum, frame):
        On SIGKILL update journal_snap with a special #<START
SECONDS>$86400 'no snapshot' string
        now_secs =  time.strftime('%H') * 60 * 60
        now_secs =  time.strftime('%M') * 60 + now_secs
        now_secs =  time.strftime('%S') + now_secs
        update_journal(self,  time.strftime('%Y%m%d'), self.feed,
now_secs, 86400)


Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

More information about the Tutor mailing list