def abort(space): """Abort the interpreter immediately. This 'dumps core' or otherwise fails in the hardest way possible on the hosting operating system.""" import signal rposix.os_kill(os.getpid(), signal.SIGABRT)
def kill(space, pid, sig): "Kill a process with a signal." try: rposix.os_kill(pid, sig) except OSError, e: raise wrap_oserror(space, e)