A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117350.html below:

[Python-Dev] Sandboxing Python

[Python-Dev] Sandboxing Python [Python-Dev] Sandboxing PythonVictor Stinner victor.stinner at gmail.com
Mon Mar 5 10:09:40 CET 2012
>>> You can't solve the too much time, without solving the halting problem,
>>
>> Not sure what you mean by that.  It seems to me that it's particularly
>> easy to do in a roughly portable way, with alarm() for example on all
>> UNIXes.
>
> What time should you set the alarm for? How much time is enough before you
> decide that a piece of code is taking too long?

pysandbox uses SIGALRM with a timeout of 5 seconds by default. You can
change this timeout or disable it completly.

pysandbox doesn't provide a function to limit the memory yet, you have
to do it manually. It's not automatic because there is no portable way
to implement such limit and it's difficult to configure it. For my IRC
bot using pysandbox, setrlimit() is used with RLIMIT_AS.

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4