summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* r82659 reintroduced some tab characters. Untabify again.Amaury Forgeot d'Arc2010-08-161-7/+7
|
* Fix other warnings under 64-bit Windows.Antoine Pitrou2010-08-151-4/+5
|
* Issue #9605: posix.getlogin() decodes the username with file filesystemVictor Stinner2010-08-151-4/+3
| | | | | | encoding and surrogateescape error handler. Patch written by David Watson. Reindent also posix_getlogin(), and fix a typo in the NEWS file.
* Issue #9604: posix.initgroups() encodes the username using the fileystemVictor Stinner2010-08-151-2/+8
| | | | encoding and surrogateescape error handler. Patch written by David Watson.
* Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal nameVictor Stinner2010-08-151-2/+2
| | | | | using the filesystem encoding and surrogateescape error handler. Patch written by David Watson.
* use pep 383 decoding for mknod and mkfifo #9570Benjamin Peterson2010-08-111-2/+10
| | | | Patch by David Watson.
* Issue #6915: Under Windows, os.listdir() didn't release the GlobalAntoine Pitrou2010-08-091-1/+5
| | | | Interpreter Lock around all system calls. Original patch by Ryan Kelly.
* Issue 9445: Fix undefined symbols on VS8.0 build.Raymond Hettinger2010-08-011-0/+9
|
* This fixes issue7900 by adding code that dealsRonald Oussoren2010-07-231-7/+42
| | | | | | | | | with the fact that getgroups(2) might return more that MAX_GROUPS on OSX. See the issue (and python-dev archives) for the gory details. Summarized: OSX behaves rather oddly and Apple says this is intentional.
* Issue #6095: Make directory argument to os.listdir optional.Martin v. Löwis2010-07-231-9/+21
| | | | Patch by Virgil Dupras.
* Re-flow several long lines from #1578269.Brian Curtin2010-07-091-11/+23
|
* Implement #1578269. Patch by Jason R. Coombs.Brian Curtin2010-07-081-20/+526
| | | | | | | | | | | | | | | | Added Windows support for os.symlink when run on Windows 6.0 or greater, aka Vista. Previous Windows versions will raise NotImplementedError when trying to symlink. Includes numerous test updates and additions to test_os, including a symlink_support module because of the fact that privilege escalation is required in order to run the tests to ensure that the user is able to create symlinks. By default, accounts do not have the required privilege, so the escalation code will have to be exposed later (or documented on how to do so). I'll be following up with that work next. Note that the tests use ctypes, which was agreed on during the PyCon language summit.
* Merged revisions 82047 via svnmerge fromSenthil Kumaran2010-06-171-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82047 | senthil.kumaran | 2010-06-17 22:08:34 +0530 (Thu, 17 Jun 2010) | 3 lines Fix Issue4452 - Incorrect docstring of os.setpgrp ........
* Remove unused variable, and fix a compilation warning on Windows.Amaury Forgeot d'Arc2010-05-151-1/+1
|
* posix_listdir(), posix_readlink(): avoid temporary PyBytes objectVictor Stinner2010-05-141-38/+10
| | | | | | Use directly PyUnicode_DecodeFSDefaultAndSize() instead of PyBytes_FromStringAndSize() + PyUnicode_FromEncodedObject() if the argument is unicode.
* posix_error_with_allocated_filename() decodes the filename withVictor Stinner2010-05-081-2/+6
| | | | | | PyUnicode_DecodeFSDefaultAndSize() and call PyErr_SetFromErrnoWithFilenameObject() instead of PyErr_SetFromErrnoWithFilename()
* Replace PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,Victor Stinner2010-05-071-1/+1
| | | | "surrogateescape") by PyUnicode_DecodeFSDefault(val).
* Issue #8603: Create a bytes version of os.environ for UnixVictor Stinner2010-05-061-24/+55
| | | | | | | Create os.environb mapping and os.getenvb() function, os.unsetenv() encodes str argument to the file system encoding with the surrogateescape error handler (instead of utf8/strict) and accepts bytes, and posix.environ keys and values are bytes.
* Recorded merge of revisions 80844-80845 via svnmerge fromVictor Stinner2010-05-061-3871/+3872
| | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r80844 | victor.stinner | 2010-05-06 01:33:33 +0200 (jeu., 06 mai 2010) | 5 lines Untabify Modules/posixmodule.c Run Antoine Pitrou "untabify" script + manual editions (OS/2 and some continuation lines). ........ r80845 | victor.stinner | 2010-05-06 02:03:44 +0200 (jeu., 06 mai 2010) | 4 lines Untabify Modules/posixmodule.c (2) Fix some more functions by hand ........ I rewrote the patch for py3k from scratch using untabify + manual editions
* Issue #8391: os.execvpe() and os.getenv() supports unicode with surrogates andVictor Stinner2010-04-231-167/+91
| | | | bytes strings for environment keys and values
* Issue #8485: PyUnicode_FSConverter() doesn't accept bytearray object anymore,Victor Stinner2010-04-221-128/+95
| | | | you have to convert your bytearray filenames to bytes
* Keep confstr entries in alphabetical order.Mark Dickinson2010-04-161-6/+6
|
* Add CS_GNU_LIBC_VERSION and CS_GNU_LIBPTHREAD_VERSION constants for constr(),Victor Stinner2010-04-161-0/+6
| | | | | and disable test_execvpe_with_bad_program() of test_os if the libc uses linuxthreads to avoid the "unknown signal 32" bug (see issue #4970).
* Issue #8412: os.system() now accepts bytes, bytearray and str withVictor Stinner2010-04-161-6/+11
| | | | surrogates.
* Port #1220212 (os.kill for Win32) to py3k.Brian Curtin2010-04-121-0/+48
|
* Change PARSE_PID to _Py_PARSE_PID (cleanup for r78946).Gregory P. Smith2010-03-141-9/+9
|
* * Replaces the internals of the subprocess module from fork through exec onGregory P. Smith2010-03-141-17/+0
| | | | | | | | | | | | | | | POSIX systems with a C extension module. This is required in order for the subprocess module to be made thread safe. The pure python implementation is retained so that it can continue to be used if for some reason the _posixsubprocess extension module is not available. The unittest executes tests on both code paths to guarantee compatibility. * Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h. Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
* Merged revisions 78531 via svnmerge fromGregory P. Smith2010-03-011-4/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78531 | gregory.p.smith | 2010-02-28 18:31:33 -0800 (Sun, 28 Feb 2010) | 2 lines Fix for r78527. It left out updating forkpty. ........
* Merged revisions 78527,78550 via svnmerge fromGregory P. Smith2010-03-011-10/+19
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78527 | gregory.p.smith | 2010-02-28 17:22:39 -0800 (Sun, 28 Feb 2010) | 4 lines Issue #7242: On Solaris 9 and earlier calling os.fork() from within a thread could raise an incorrect RuntimeError about not holding the import lock. The import lock is now reinitialized after fork. ........ r78550 | gregory.p.smith | 2010-02-28 22:01:02 -0800 (Sun, 28 Feb 2010) | 2 lines Fix test to be skipped on windows. ........
* Merged revisions 78546 via svnmerge fromGregory P. Smith2010-03-011-6/+20
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78546 | gregory.p.smith | 2010-02-28 21:43:43 -0800 (Sun, 28 Feb 2010) | 3 lines Fixes issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1 parameter on some platforms such as OS X. ........
* Forward port a number of OSX bugfixes from the trunk to 3.2Ronald Oussoren2010-02-071-0/+4
|
* Issue #7561: Fix crashes when using bytearray objects with the posixAntoine Pitrou2010-01-171-1/+1
| | | | module.
* Merged revisions ↵Benjamin Peterson2009-12-311-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 76847,76851,76869,76882,76891-76892,76924,77007,77070,77092,77096,77120,77126,77155 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76847 | benjamin.peterson | 2009-12-14 21:25:27 -0600 (Mon, 14 Dec 2009) | 1 line adverb ........ r76851 | benjamin.peterson | 2009-12-15 21:28:52 -0600 (Tue, 15 Dec 2009) | 1 line remove lib2to3 resource ........ r76869 | vinay.sajip | 2009-12-17 08:52:00 -0600 (Thu, 17 Dec 2009) | 1 line Issue #7529: logging: Minor correction to documentation. ........ r76882 | georg.brandl | 2009-12-19 11:30:28 -0600 (Sat, 19 Dec 2009) | 1 line #7527: use standard versionadded tags. ........ r76891 | georg.brandl | 2009-12-19 12:16:31 -0600 (Sat, 19 Dec 2009) | 1 line #7479: add note about function availability on Unices. ........ r76892 | georg.brandl | 2009-12-19 12:20:18 -0600 (Sat, 19 Dec 2009) | 1 line #7480: remove tautology. ........ r76924 | georg.brandl | 2009-12-20 08:28:05 -0600 (Sun, 20 Dec 2009) | 1 line Small indentation fix. ........ r77007 | gregory.p.smith | 2009-12-23 03:31:11 -0600 (Wed, 23 Dec 2009) | 3 lines Fix possible integer overflow in lchown and fchown functions. For issue1747858. ........ r77070 | amaury.forgeotdarc | 2009-12-27 14:06:44 -0600 (Sun, 27 Dec 2009) | 2 lines Fix a typo in comment ........ r77092 | georg.brandl | 2009-12-28 02:48:24 -0600 (Mon, 28 Dec 2009) | 1 line #7404: remove reference to non-existing example files. ........ r77096 | benjamin.peterson | 2009-12-28 14:51:17 -0600 (Mon, 28 Dec 2009) | 1 line document new fix_callable behavior ........ r77120 | georg.brandl | 2009-12-29 15:09:17 -0600 (Tue, 29 Dec 2009) | 1 line #7595: fix typo in argument default constant. ........ r77126 | amaury.forgeotdarc | 2009-12-29 17:06:17 -0600 (Tue, 29 Dec 2009) | 2 lines #7579: Add docstrings to the msvcrt module ........ r77155 | georg.brandl | 2009-12-30 13:03:00 -0600 (Wed, 30 Dec 2009) | 1 line We only support Windows NT derivatives now. ........
* Merged revisions 76636 via svnmerge fromAntoine Pitrou2009-12-021-0/+27
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76636 | antoine.pitrou | 2009-12-02 21:37:54 +0100 (mer., 02 déc. 2009) | 5 lines Issue #7333: The `posix` module gains an `initgroups()` function providing access to the initgroups(3) C library call on Unix systems which implement it. Patch by Jean-Paul Calderone. ........
* Merged revisions 76550 via svnmerge fromMartin v. Löwis2009-11-271-0/+89
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76550 | martin.v.loewis | 2009-11-27 14:56:01 +0100 (Fr, 27 Nov 2009) | 2 lines Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}. ........
* Merged revisions 74841 via svnmerge fromBenjamin Peterson2009-10-041-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74841 | thomas.wouters | 2009-09-16 14:55:54 -0500 (Wed, 16 Sep 2009) | 23 lines 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. ........
* Merged revisions 73675 via svnmerge fromHirokazu Yamamoto2009-06-291-58/+2
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73675 | hirokazu.yamamoto | 2009-06-29 20:27:03 +0900 | 3 lines Issue #4856: Py_GetFileAttributesEx[AW] are not needed because GetFileAttributesEx[AW] won't fail with ERROR_CALL_NOT_IMPLEMENTED on win NT. Reviewed by Amaury Forgeot d'Arc. ........
* Merged revisions 73603 via svnmerge fromHirokazu Yamamoto2009-06-281-300/+241
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73603 | hirokazu.yamamoto | 2009-06-28 19:23:00 +0900 | 1 line Issue #4856: Remove checks for win NT. ........
* Issue #6012: Add cleanup support to O& argument parsing.Martin v. Löwis2009-05-291-2/+0
|
* Make some private functions static (thanks `make smelly`)Antoine Pitrou2009-05-241-0/+1
|
* Try to fix building under Windows (where SIZEOF_PID_T apparently doesn't exist)Antoine Pitrou2009-05-241-3/+1
|
* Merged revisions 72855 via svnmerge fromAntoine Pitrou2009-05-231-11/+17
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72855 | antoine.pitrou | 2009-05-23 18:06:49 +0200 (sam., 23 mai 2009) | 3 lines Some pid_t-expecting or producing functions were forgotten in r72852. ........
* Merged revisions 72852 via svnmerge fromAntoine Pitrou2009-05-231-17/+33
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72852 | antoine.pitrou | 2009-05-23 17:37:45 +0200 (sam., 23 mai 2009) | 5 lines Issue #1983: Fix functions taking or returning a process identifier to use the dedicated C type `pid_t` instead of a C `int`. Some platforms have a process identifier type wider than the standard C integer type. ........
* Merged revisions 72698-72699 via svnmerge fromHirokazu Yamamoto2009-05-171-24/+16
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72698 | hirokazu.yamamoto | 2009-05-17 11:52:09 +0900 | 1 line Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. ........ r72699 | hirokazu.yamamoto | 2009-05-17 11:58:36 +0900 | 1 line Added NEWS for r72698. ........
* Issue #5990: fix memory leak introduced by PEP 383 commitsAntoine Pitrou2009-05-101-2/+5
|
* Rename utf8b error handler to surrogateescape.Martin v. Löwis2009-05-101-5/+5
|
* Issue #5943: Fix lchflags crash.Martin v. Löwis2009-05-051-1/+1
|
* Added missing semicolon.Eric Smith2009-05-051-1/+1
|
* Issue #5915: Implement PEP 383, Non-decodable Bytes inMartin v. Löwis2009-05-051-205/+315
| | | | System Character Interfaces.
* Merged revisions 72273 via svnmerge fromHirokazu Yamamoto2009-05-041-6/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72273 | hirokazu.yamamoto | 2009-05-04 14:28:39 +0900 | 1 line Issue #5913: os.listdir() should fail for empty path on windows. ........