I'm having some difficulty with an alarm() situation. Here is what I tried: import os, sys, signal if __name == __main__: try: signal.alarm(60) os.system('/usr/games/quill') except: os.system('killall quill') This fails when the alarm goes off because the except doesn't catch the SIGALRM. If I add a signal(signal.SIGALRM, handler) the handler of course catches the SIGALRM, but doesn't process it until AFTER the os.system call (usr/games/quill) completes! (The docs seem to imply this, that handlers only operate between Python atomic operations.) Can anyone say what I've got wrong here or suggest a way to do what I am trying to do? Thanks in advance.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4