summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* #11515: Merge with 3.1.Ezio Melotti2011-03-151-1/+1
|\
| * Merged revisions 88111 via svnmerge fromAntoine Pitrou2011-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88111 | antoine.pitrou | 2011-01-19 16:21:35 +0100 (mer., 19 janv. 2011) | 4 lines Issue #10898: Allow compiling the posix module when the C library defines a symbol named FSTAT. ........
| * Merged revisions 87802 via svnmerge fromAntoine Pitrou2011-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87802 | antoine.pitrou | 2011-01-06 19:25:55 +0100 (jeu., 06 janv. 2011) | 6 lines Issue #7858: Raise an error properly when os.utime() fails under Windows on an existing file. (this does not seem to be easily testable) ........
| * Merged revisions 87666 via svnmerge fromAmaury Forgeot d'Arc2011-01-031-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87666 | amaury.forgeotdarc | 2011-01-03 01:19:11 +0100 (lun., 03 janv. 2011) | 4 lines #8278: In the Windows implementation of stat() and utime(), use time_t instead of int. This gives support for dates after 2038, at least when compiled with VS2003 or later, where time_t is 64bit. ........
| * Merged revisions 86808 via svnmerge fromStefan Krah2010-11-261-48/+48
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86808 | stefan.krah | 2010-11-26 17:16:47 +0100 (Fri, 26 Nov 2010) | 1 line Further indentation cleanup. ........
| * Merged revisions 86804 via svnmerge fromStefan Krah2010-11-261-7/+11
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86804 | stefan.krah | 2010-11-26 13:58:05 +0100 (Fri, 26 Nov 2010) | 1 line Issue #10383: Fix two leaks. ........
| * Merged revisions 84489 via svnmerge fromAntoine Pitrou2010-09-041-1/+10
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84489 | antoine.pitrou | 2010-09-04 19:21:57 +0200 (sam., 04 sept. 2010) | 4 lines Issue #7736: Release the GIL around calls to opendir() and closedir() in the posix module. Patch by Marcin Bachry. ........
| * Merged revisions 84076 via svnmerge fromAntoine Pitrou2010-08-151-4/+5
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84076 | antoine.pitrou | 2010-08-15 20:07:50 +0200 (dim., 15 août 2010) | 4 lines Fix other warnings under 64-bit Windows. ........
| * Merged revisions 84063 via svnmerge fromVictor Stinner2010-08-151-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84063 | victor.stinner | 2010-08-15 11:33:08 +0200 (dim., 15 août 2010) | 5 lines Issue #9605: posix.getlogin() decodes the username with file filesystem encoding and surrogateescape error handler. Patch written by David Watson. Reindent also posix_getlogin(), and fix a typo in the NEWS file. ........
| * Merged revisions 84060 via svnmerge fromVictor Stinner2010-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84060 | victor.stinner | 2010-08-15 11:12:51 +0200 (dim., 15 août 2010) | 4 lines Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name using the filesystem encoding and surrogateescape error handler. Patch written by David Watson. ........
| * Merged revisions 83951 via svnmerge fromBenjamin Peterson2010-08-111-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83951 | benjamin.peterson | 2010-08-11 14:20:42 -0500 (Wed, 11 Aug 2010) | 4 lines use pep 383 decoding for mknod and mkfifo #9570 Patch by David Watson. ........
| * Merged revisions 83921 via svnmerge fromAntoine Pitrou2010-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83921 | antoine.pitrou | 2010-08-10 01:39:31 +0200 (mar., 10 août 2010) | 4 lines Issue #6915: Under Windows, os.listdir() didn't release the Global Interpreter Lock around all system calls. Original patch by Ryan Kelly. ........
| * 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.
| * Merged revisions 82049 via svnmerge fromSenthil Kumaran2010-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r82049 | senthil.kumaran | 2010-06-17 22:18:06 +0530 (Thu, 17 Jun 2010) | 9 lines Merged revisions 82047 via svnmerge from 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 ........ ................
| * Revert r81171 (posix_listdir(), posix_readlink(): avoid temporary PyBytes ↵Victor Stinner2010-05-141-10/+38
| | | | | | | | | | | | | | | | | | | | object) PyUnicode_DecodeFSDefault*() doesn't use surrogateescape error handler, and so PyUnicode_FromEncodedObject(v, Py_FileSystemDefaultEncoding, "surrogateescape") cannot be replaced by PyUnicode_DecodeFSDefault(). It's a bad idea to try to fix surrogates things in Python 3.1...
| * Merged revisions 81170 via svnmerge fromVictor Stinner2010-05-141-38/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81170 | victor.stinner | 2010-05-14 18:35:39 +0200 (ven., 14 mai 2010) | 6 lines posix_listdir(), posix_readlink(): avoid temporary PyBytes object Use directly PyUnicode_DecodeFSDefaultAndSize() instead of PyBytes_FromStringAndSize() + PyUnicode_FromEncodedObject() if the argument is unicode. ........
| * Recorded merge of revisions 80846 via svnmerge fromVictor Stinner2010-05-061-3884/+3885
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80846 | victor.stinner | 2010-05-06 02:08:46 +0200 (jeu., 06 mai 2010) | 20 lines Recorded merge of revisions 80844-80845 via svnmerge from 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 ................
| * Merged revisions 80421,80424 via svnmerge fromVictor Stinner2010-04-251-167/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80421 | victor.stinner | 2010-04-23 23:41:56 +0200 (ven., 23 avril 2010) | 3 lines Issue #8391: os.execvpe() and os.getenv() supports unicode with surrogates and bytes strings for environment keys and values ........ r80424 | victor.stinner | 2010-04-24 00:55:39 +0200 (sam., 24 avril 2010) | 13 lines Fix test_undecodable_env of test_subproces for non-ASCII directory This test was introduced by r80421 (issue #8391). The fix: copy the environment variables instead of starting Python in an empty environement. In an empty environment, the locale is C and Python uses ASCII for the default file system encoding. The non-ASCII directory will be encoded using surrogates, but Python3 is unable to load a module or package with a filename using surrogates. See issue #8242 for more information about running Python3 with a non-ascii directory in an empty environement. ........
| * Merged revisions 80108,80111,80114-80115 via svnmerge fromMark Dickinson2010-04-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80108 | victor.stinner | 2010-04-16 13:23:43 +0100 (Fri, 16 Apr 2010) | 4 lines Add CS_GNU_LIBC_VERSION and CS_GNU_LIBPTHREAD_VERSION constants for constr(), 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). ........ r80111 | mark.dickinson | 2010-04-16 13:47:52 +0100 (Fri, 16 Apr 2010) | 1 line Keep confstr entries in alphabetical order. ........ r80114 | mark.dickinson | 2010-04-16 14:45:35 +0100 (Fri, 16 Apr 2010) | 1 line Issue #4970: move linuxthreads check outside the affected test, and use skipIf ........ r80115 | mark.dickinson | 2010-04-16 14:51:27 +0100 (Fri, 16 Apr 2010) | 1 line Don't assume that os.confstr_names exists. ........
| * Merged revisions 80105 via svnmerge fromVictor Stinner2010-04-161-6/+11
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80105 | victor.stinner | 2010-04-16 13:45:13 +0200 (ven., 16 avril 2010) | 3 lines Issue #8412: os.system() now accepts bytes, bytearray and str with surrogates. ........
| * Merged revisions 78548 via svnmerge fromGregory P. Smith2010-03-011-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78548 | gregory.p.smith | 2010-02-28 21:54:14 -0800 (Sun, 28 Feb 2010) | 10 lines Merged revisions 78546 via svnmerge from 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. ........ ................
| * Merged revisions 77571 via svnmerge fromAntoine Pitrou2010-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r77571 | antoine.pitrou | 2010-01-17 13:16:23 +0100 (dim., 17 janv. 2010) | 4 lines Issue #7561: Fix crashes when using bytearray objects with the posix module. ........
| * Merged revisions 77167 via svnmerge fromBenjamin Peterson2009-12-311-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77167 | benjamin.peterson | 2009-12-30 21:11:23 -0600 (Wed, 30 Dec 2009) | 61 lines Merged revisions 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 75246 via svnmerge fromBenjamin Peterson2009-10-041-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75246 | benjamin.peterson | 2009-10-04 15:32:25 -0500 (Sun, 04 Oct 2009) | 29 lines Merged revisions 74841 via svnmerge from 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. ........ ................
* | Issue #10898: Allow compiling the posix module when the C library definesAntoine Pitrou2011-01-191-0/+2
| | | | | | | | a symbol named FSTAT.
* | Issue #9611: remove useless and dangerous explicit conversion to size_tVictor Stinner2011-01-111-1/+1
| |
* | Issue #7858: Raise an error properly when os.utime() fails under WindowsAntoine Pitrou2011-01-061-0/+1
| | | | | | | | | | | | on an existing file. (this does not seem to be easily testable)
* | Issue #9015, #9611: FileIO.readinto(), FileIO.write() and os.write() clamp theVictor Stinner2011-01-041-2/+9
| | | | | | | | length to 2^31-1 on Windows.
* | #8278: In the Windows implementation of stat() and utime(),Amaury Forgeot d'Arc2011-01-031-12/+21
| | | | | | | | | | use time_t instead of int. This gives support for dates after 2038, at least when compiled with VS2003 or later, where time_t is 64bit.
* | Fix #9333. The symlink function is always available now, raising OSErrorBrian Curtin2010-12-281-19/+13
| | | | | | | | when the user doesn't hold the symbolic link privilege rather than hiding it.
* | Issue #10637: Called CloseHandle twice in os.stat/os.lstat (Windows)Hirokazu Yamamoto2010-12-071-4/+4
| |
* | Should use posix_error here.Hirokazu Yamamoto2010-12-051-5/+3
| |
* | Sorry, I had introduced tab in source code.Hirokazu Yamamoto2010-12-051-1/+1
| |
* | Fixed several corner case issues on os.stat/os.lstat related to reparseHirokazu Yamamoto2010-12-041-93/+110
| | | | | | | | | | | | | | points. (Windows) - Set S_IEXEC via final path name not link name. - Set S_IFLNK also via FindFirstFile (when CreateFile fails)
* | Fix #9333. Expose os.symlink on Windows only when usable.Brian Curtin2010-12-021-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege is an account privilege that is required to be held by the user. Not only must the privilege be enabled for the account, the activated privileges for the currently running application must be adjusted to enable the requested privilege. Rather than exposing an additional function to be called prior to the user's first os.symlink call, we handle the AdjustTokenPrivileges Windows API call internally and only expose os.symlink when the privilege escalation was successful. Due to the change of only exposing os.symlink when it's available, we can go back to the original test skipping methods of checking via `hasattr`.
* | Include structseq.h in Python.h, and remove now-redundant includes in ↵Georg Brandl2010-11-301-1/+0
| | | | | | | | individual sources.
* | Fix for #8879.Brian Curtin2010-11-281-2/+18
| | | | | | | | | | | | | | Amaury noticed that this was originally written in a way that would fail on names that can't be encoded with the mbcs codec. Restructured the function to work with wide names first then narrow names second, to fall in line with the way other functions are written in posixmodule.c.
* | Windows: fix leak in posix_listdir.Stefan Krah2010-11-271-0/+1
| |
* | Fix additional leaks.Stefan Krah2010-11-271-0/+2
| |
* | Further indentation cleanup.Stefan Krah2010-11-261-49/+49
| |
* | Issue #10383: Fix two leaks.Stefan Krah2010-11-261-7/+11
| |
* | Fix #8879. Add os.link support to Windows.Brian Curtin2010-11-241-0/+32
| | | | | | | | | | | | | | | | Additionally, the st_ino attribute of stat structures was not being filled in. This was left out of the fix to #10027 and was noticed due to test_tarfile failing when applying the patch for this issue. An earlier version of the fix to #10027 included st_ino, but that attribute got lost in the shuffle of a few review/fix cycles. All tests pass.
* | ifdef a Windows specific section.Brian Curtin2010-11-241-0/+2
| |
* | Fix #10027. st_nlink not set on Windows calls to os.stat/lstat.Brian Curtin2010-11-241-302/+279
| | | | | | | | | | | | Note: This patch has no tests because as of now there is no way to create links. #8879 adds that and the tests will go in there. I've manually observed that existing links on my system function properly with this.
* | Issue #10143: Update "os.pathconf" valuesJesus Cea2010-10-251-0/+33
| |
* | Fix a typo. full->finalBrian Curtin2010-09-241-1/+1
| |
* | #9808. Implement os.getlogin for Windows, completed by Jon Anglin.Brian Curtin2010-09-231-2/+15
| | | | | | | | | | | | | | The test is semi-dumb, it just makes sure something comes back since we don't have a solid source to validate the returned login. We can't be 100% sure that the USERNAME env var will always match what os.getlogin() returns, so we don't make any specific assertion there.
* | Issue #9908: Fix os.stat() on bytes paths under Windows 7.Antoine Pitrou2010-09-211-17/+31
| |
* | Remove unused code in posixmodule.cAmaury Forgeot d'Arc2010-09-171-68/+0
| |
* | Remove C++-style commentsAntoine Pitrou2010-09-141-2/+2
| |