Re: Aborting Python from C code

2011-05-04 Thread Chris Angelico
On Sat, Apr 30, 2011 at 7:29 PM, Dylan Evans wrote: > I think i see what you are trying to do but it depends on the environment > and your goals. > Generally i think you need to separate your code by forking (or perhaps you > have already done that?), > then you can run a check to see if the proce

Re: Aborting Python from C code

2011-04-30 Thread Dylan Evans
I think i see what you are trying to do but it depends on the environment and your goals. Generally i think you need to separate your code by forking (or perhaps you have already done that?), then you can run a check to see if the process died as expected. I don't know though, this not much inform

Re: Aborting Python from C code

2011-04-30 Thread Chris Angelico
On Sat, Apr 30, 2011 at 6:08 PM, Miki Tebeka wrote: >> In our sandboxed Python environment, I would like to be able to >> trigger an abort of the currently-running Python script (from a signal >> handler or another thread). > There's os.abort That core dumps the process; what I want is to force t

Re: Aborting Python from C code

2011-04-30 Thread Miki Tebeka
> In our sandboxed Python environment, I would like to be able to > trigger an abort of the currently-running Python script (from a signal > handler or another thread). There's os.abort -- http://mail.python.org/mailman/listinfo/python-list

Aborting Python from C code

2011-04-28 Thread Chris Angelico
In our sandboxed Python environment, I would like to be able to trigger an abort of the currently-running Python script (from a signal handler or another thread). Currently, I use PyErr_SetInterrupt() which raises KeyboardInterrupt in the script; this works for the most part, but can be bypassed wi