[code.view]

[top] / python / PyMOTW / signal / signal_ignore.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2008 Doug Hellmann All rights reserved.
     #
     """
     """
     
     __version__ = "$Id$"
     #end_pymotw_header
     
     import signal
     import os
     import time
     
     def do_exit(sig, stack):
         raise SystemExit('Exiting')
     
     signal.signal(signal.SIGINT, signal.SIG_IGN)
     signal.signal(signal.SIGUSR1, do_exit)
     
     print 'My PID:', os.getpid()
     
     signal.pause()
     

[top] / python / PyMOTW / signal / signal_ignore.py

contact | logmethods.com