Skip to content

Instantly share code, notes, and snippets.

@caglar10ur
Created November 27, 2012 19:42
Show Gist options
  • Save caglar10ur/4156522 to your computer and use it in GitHub Desktop.
Save caglar10ur/4156522 to your computer and use it in GitHub Desktop.
Poor man's siginterrupt (for python < 2.6)
import ctypes
def siginterrupt(signum, flag):
libc = ctypes.CDLL("libc.so.6")
if libc.siginterrupt(signum, flag) != 0:
raise OSError("siginterrupt failed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment