About UNIX shell trap, any relative function in Python ?
Chris Angelico
rosuav at gmail.com
Sat Dec 15 11:04:57 EST 2012
More information about the Python-list mailing list
Sat Dec 15 11:04:57 EST 2012
- Previous message (by thread): About UNIX shell trap, any relative function in Python ?
- Next message (by thread): About UNIX shell trap, any relative function in Python ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Dec 16, 2012 at 2:34 AM, moonhkt <moonhkt at gmail.com> wrote: > > Hi All > > Machine : AIX 5.3 > Python : 2.6.2 > > In UNIX have, trap to run defined CLEAN_UP function. When HUP INT > KILL STOP TERM will run CLEAN_UP function. > > trap 'echo "\n\nProcessing Clean up"; CLEAN_UP; exit' HUP INT KILL > STOP TERM > > Any relative function in Python ? Yep! Check out the 'signal' module: http://docs.python.org/3.3/library/signal.html ChrisA
- Previous message (by thread): About UNIX shell trap, any relative function in Python ?
- Next message (by thread): About UNIX shell trap, any relative function in Python ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list