Commit Graph

22 Commits

Author SHA1 Message Date
Georg Brandl 9933da0663 #8993: fix reference. 2010-06-14 15:58:39 +00:00
Antoine Pitrou 6a2656094d Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
embedders of the interpreter to set sys.argv without also modifying
sys.path.  This helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
2010-05-21 17:12:38 +00:00
Georg Brandl 54fd8ae0a3 Fix description for Py_GetPath(); it sounded like it always returned sys.path. 2010-01-07 20:54:45 +00:00
Ezio Melotti 062d2b52f3 #7388: "python".capitalize() in the Doc 2009-12-19 22:41:49 +00:00
Georg Brandl 670e5969cb #7521: remove Py_GetBuildNumber(), which was removed in favor of Py_GetBuildInfo(). 2009-12-19 17:34:32 +00:00
Thomas Wouters c4dcb3801e Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
acquiring the import lock around fork() calls. This prevents other threads
from having that lock while the fork happens, and is the recommended way of
dealing with such issues. There are two other locks we care about, the GIL
and the Thread Local Storage lock. The GIL is obviously held when calling
Python functions like os.fork(), and the TLS lock is explicitly reallocated
instead, while also deleting now-orphaned TLS data.

This only fixes calls to os.fork(), not extension modules or embedding
programs calling C's fork() directly. Solving that requires a new set of API
functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
warning explaining the problem to the documentation in the mean time.

This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
getting the import lock reallocated, seemingly to avoid this very same
problem. This is not the right approach, because the import lock is a
re-entrant one, and reallocating would do the wrong thing when forking while
holding the import lock.

Will backport to 2.6, minus the tiny AIX behaviour change.
2009-09-16 19:55:54 +00:00
Benjamin Peterson ea7120c7c1 Py_SetPythonHome uses static storage #6913 2009-09-15 03:36:26 +00:00
Georg Brandl 2622b549d7 #5840: dont claim we dont support TLS. 2009-04-27 17:09:53 +00:00
Jeroen Ruigrok van der Werven 2dcf46ee2c Rewrite a sentence to be more in line with the rest of the documentation with
regard to person and audience.
2009-04-25 13:07:40 +00:00
Georg Brandl 1ede0d670f #5298: clarify docs about GIL by using more consistent wording. 2009-04-05 17:17:42 +00:00
Andrew M. Kuchling a178a69819 Fix 'the the' duplication 2009-04-03 21:45:29 +00:00
Georg Brandl e83a4adba7 #5486: typos. 2009-03-13 19:03:58 +00:00
Georg Brandl 4400d84bf7 #5015: document PythonHome API functions. 2009-02-05 11:32:18 +00:00
Georg Brandl acc802b171 #5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path. 2009-02-05 10:37:07 +00:00
Georg Brandl dd958e0d28 Fix call signature and markup. 2009-01-13 08:11:07 +00:00
Kristján Valur Jónsson 0e2d8c36e3 Issue 4293: Make Py_AddPendingCall() thread safe
Add test cases and documentation
2009-01-09 21:35:16 +00:00
Georg Brandl c62ef8b4d9 Remove trailing whitespace. 2009-01-03 20:55:06 +00:00
Benjamin Peterson 9d1e2cdad6 PyGILState_Acquire -> PyGILState_Ensure 2008-10-10 22:23:41 +00:00
Georg Brandl b19be571e0 Some cleanup in the docs. 2007-12-29 10:57:00 +00:00
Georg Brandl f19b951126 Add documentation for PySys_* functions.
Written by Charlie Shepherd for GHOP. Also fixes #1245.
2007-12-02 21:58:54 +00:00
Georg Brandl 16f1df91ce Document PyEval_* functions from ceval.c.
Credits to Michael Sloan from GHOP.
2007-12-01 22:24:47 +00:00
Georg Brandl 8ec7f65613 Move the 2.6 reST doc tree in place. 2007-08-15 14:28:01 +00:00