summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)Serhiy Storchaka2017-07-111-3/+5
| | | | called with bytes-like argument.
* [security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)Serhiy Storchaka2017-06-281-6/+12
| | | | | | | Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters.
* bpo-30769: Fix reference leak introduced in 77703942c59 (#2416)Eric N. Vander Weele2017-06-271-0/+4
| | | | | | | New error condition paths were introduced, which did not decrement `key2` and `val2` objects. Therefore, decrement references before jumping to the error label. Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
* bpo-30746: Prohibited the '=' character in environment variable names (#2382)Serhiy Storchaka2017-06-251-4/+28
| | | | in `os.putenv()` and `os.spawn*()`.
* bpo-30602: Fix lastarg in os.spawnve() (#2287)Victor Stinner2017-06-231-3/+3
| | | | Fix a regression introduced by myself in the commit 526b22657cb18fe79118c2ea68511aca09430c2c.
* bpo-30602: Fix refleak in os.spawnv() (#2212)Victor Stinner2017-06-151-1/+1
| | | | | When os.spawnv() fails while handling arguments, free correctly argvlist: pass lastarg+1 rather than lastarg to free_string_array() to also free the first item.
* bpo-30602: Fix refleak in os.spawnve() (#2184)Victor Stinner2017-06-141-2/+2
| | | | | When os.spawnve() fails while handling arguments, free correctly argvlist: pass lastarg+1 rather than lastarg to free_string_array() to also free the first item.
* bpo-30650: Fixed a syntax error: missed right parentheses (#2154)messi Liao2017-06-131-1/+1
|
* bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)Gregory P. Smith2017-05-291-27/+44
| | | | Instead use keyword only arguments to os.register_at_fork for each of the scenarios. Updates the documentation for clarity.
* bpo-16500: Allow registering at-fork handlers (#1715)Antoine Pitrou2017-05-271-30/+154
| | | | | | | | | | | | * bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit
* bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666).xdegaye2017-05-221-18/+5
| | | | | | bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666). * Use only the LongLong form for the conversions.
* bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096)Serhiy Storchaka2017-04-191-18/+42
| | | | | | raised an error. Replace them with using concrete types API that never fails if appropriate.
* bpo-25996: Added support of file descriptors in os.scandir() on Unix. (#502)Serhiy Storchaka2017-03-301-22/+83
| | | | os.fwalk() is sped up by 2 times by using os.scandir().
* bpo-29619: Convert st_ino using unsigned integer (#557)Victor Stinner2017-03-091-5/+8
| | | | bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode (st_ino) using unsigned integers.
* bpo-29556: Remove unused #include <langinfo.h> (#98)Yen Chi Hsuan2017-02-151-4/+0
| | | | | | bltinmodule.c: Added in b744ba1 and no longer necessary since d64e8a7 posixmodule.c: Added in d1cd4d4 and no longer necessary since efb00c0 pythonrun.c: Added in 73d538b and no longer necessary since d600951 sysmodule.c: Added in 5467d4c and no longer necessary since a2c17c5
* Issue #29513: Fix outdated comment and remove redundand code is os.scandir().Serhiy Storchaka2017-02-091-7/+3
|
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-10/+5
| | | | possible. Patch is writen with Coccinelle.
* Issue #29092: Merge 3.6.Xiang Zhang2017-01-221-2/+3
|\
| * Issue #29092: Sync os.stat's doc and docstring on path type.Xiang Zhang2017-01-221-2/+3
| |\
* | \ Issue #29034: Merge 3.6.Xiang Zhang2017-01-081-53/+56
|\ \ \ | |/ /
| * | Issue #29034: Fix memory leak and use-after-free in path_converter.Xiang Zhang2017-01-081-53/+56
| | |
* | | Use _PyObject_CallNoArg()Victor Stinner2016-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | Replace: PyObject_CallFunctionObjArgs(callable, NULL) with: _PyObject_CallNoArg(callable)
* | | Issue #28152: Fix -Wunreachable-code warnings on ClangVictor Stinner2016-12-051-0/+5
| | | | | | | | | | | | Don't declare dead code when the code is declared with Clang.
* | | Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-2/+2
| | | | | | | | | | | | | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* | | Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* | | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-1/+1
|\ \ \ | |/ / | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
| * | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-1/+1
| | | | | | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* | | Issue #28732: Raise ValueError when argv[0] is emptySteve Dower2016-11-201-0/+34
|\ \ \ | |/ /
| * | Issue #28732: Raise ValueError when argv[0] is emptySteve Dower2016-11-201-0/+34
| |\ \ | | |/
| | * Issue #28732: Raise ValueError when argv[0] is empty.Steve Dower2016-11-201-0/+9
| | |
* | | Issue #28732: Raise ValueError when os.spawn*() is passed an empty tuple of ↵Steve Dower2016-11-201-0/+10
|\ \ \ | |/ / | | | | | | arguments
| * | Issue #28732: Raise ValueError when os.spawn*() is passed an empty tuple of ↵Steve Dower2016-11-201-0/+10
| | | | | | | | | | | | arguments
* | | Merge from 3.6Steve Dower2016-11-201-2/+7
|\ \ \ | |/ /
| * | Merge from 3.5 and fix a few other functions missing IPH handling.Steve Dower2016-11-201-2/+7
| |\ \ | | |/
| | * Issue #28732: Fix crash in os.spawnv() with no elements in argsSteve Dower2016-11-201-0/+16
| | | | | | | | | | | | Prevents crashes in some other posixmodule.c functions
* | | Issue #28585: Restored docstring of os._isdir().Serhiy Storchaka2016-11-081-4/+2
|\ \ \ | |/ /
| * | Issue #28585: Restored docstring of os._isdir().Serhiy Storchaka2016-11-081-4/+2
| |\ \ | | |/
| | * Issue #28585: Restored docstring of os._isdir().Serhiy Storchaka2016-11-081-4/+2
| | |
* | | Issue #28586: Converted os.scandir() to Argument Clinic.Serhiy Storchaka2016-11-061-100/+91
|/ /
* | Issue #28394: More typo fixes for 3.6+Martin Panter2016-10-101-1/+1
| |
* | Issue #27998: Fixed bytes path support in os.scandir() on Windows.Serhiy Storchaka2016-10-081-46/+43
| | | | | | | | Patch by Eryk Sun.
* | Increase buffer for readlink() in case OS will support longer names one day.Christian Heimes2016-09-231-3/+4
|\ \ | |/
| * Increase buffer for readlink() in case OS will support longer names one day.Christian Heimes2016-09-231-3/+4
| |
| * Issue #28075: Fix test_access_denied in Python 3.5Berker Peksag2016-09-181-2/+4
| | | | | | | | I forgot there two variations of os.stat() in Python 3.5.
* | Fix memleak in os.getrandom()Victor Stinner2016-09-201-10/+18
| | | | | | | | | | | | | | | | Issue #27778: Fix a memory leak in os.getrandom() when the getrandom() is interrupted by a signal and a signal handler raises a Python exception. Modify also os_getrandom_impl() to avoid the temporary buffer, use directly a Python bytes object.
* | Fix memory leak in path_converter()Victor Stinner2016-09-191-1/+1
| | | | | | | | | | Issue #28200: Replace PyUnicode_AsWideCharString() with PyUnicode_AsUnicodeAndSize().
* | Issue #28075: Merge from 3.5Berker Peksag2016-09-171-2/+4
|\ \ | |/
| * Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of ↵Berker Peksag2016-09-171-2/+4
| | | | | | | | | | | | os.stat() Patch by Eryk Sun.
* | Issue #28156: Export os.getpid() conditionallyBerker Peksag2016-09-151-0/+2
| | | | | | | | Patch by Ed Schouten.
* | Issue #28114: Fix a crash in parse_envlist() when env contains byte stringsBerker Peksag2016-09-151-17/+39
| | | | | | | | Patch by Eryk Sun.