Re: Aborting Python from C code

2011-05-04 Thread Chris Angelico
On Sat, Apr 30, 2011 at 7:29 PM, Dylan Evans dy...@contentfree.info 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

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

Re: Aborting Python from C code

2011-04-30 Thread Chris Angelico
On Sat, Apr 30, 2011 at 6:08 PM, Miki Tebeka miki.teb...@gmail.com 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

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

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