[pypy-dev] Getting a backtrace out of the sandbox

Костя Лопухин kostia.lopuhin at gmail.com
Fri Jun 5 11:31:14 CEST 2015


Yes, indeed, this is the easiest way, sorry for confusion!
We process exception inside the sandbox in order to fix line numbers
and remove some frames, so that information corresponds to what is
seen by the author of the script - this is slightly easier to do
inside the sandbox (no need to parse anything).

2015-06-05 10:59 GMT+03:00 Armin Rigo <arigo at tunes.org>:
> Hi,
>
> On 5 June 2015 at 09:22, Костя Лопухин <kostia.lopuhin at gmail.com> wrote:
>> As far as I know, there is no built-in way, but you can catch all
>> exceptions and send them to the parent process in the same way you
>> send the result - this is what we do for our sandbox usecase.
>
> The subprocess should print the exception to it captured stderr, which
> the parent reads and returns in communicate(), no?  Maybe I'm missing
> something.
>
>
> A bientôt,
>
> Armin.


More information about the pypy-dev mailing list