summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 83088 via svnmerge fromRonald Oussoren2010-07-241-7/+42
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83088 | ronald.oussoren | 2010-07-23 14:53:51 +0100 (Fri, 23 Jul 2010) | 8 lines This fixes issue7900 by adding code that deals 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. ........
* Remove PYOS_OS2 special cases from the Solaris/OpenBSD section.Stefan Krah2010-07-131-5/+1
|
* Issue #9185: On Solaris and OpenBSD, posix_getcwd() could loop indefinitelyStefan Krah2010-07-131-0/+23
| | | | if the path length exceeded PATH_MAX.
* Fix Issue4452 - Incorrect docstring of os.setpgrpSenthil Kumaran2010-06-171-1/+1
|
* Remove unused variable, and fix a compilation warning on WindowsAmaury Forgeot d'Arc2010-05-151-1/+1
|
* Untabify Modules/posixmodule.c (2)Victor Stinner2010-05-061-10/+10
| | | | Fix some more functions by hand
* Untabify Modules/posixmodule.cVictor Stinner2010-05-051-5047/+5047
| | | | | Run Antoine Pitrou "untabify" script + manual editions (OS/2 and some continuation lines).
* Add missing return statement in an error condition.Brian Curtin2010-04-031-1/+1
|
* Implement #1220212. Add os.kill support for Windows.Brian Curtin2010-04-021-0/+48
| | | | | | | | | | | | | | os.kill takes one of two newly added signals, CTRL_C_EVENT and CTRL_BREAK_EVENT, or any integer value. The events are a special case which work with subprocess console applications which implement a special console control handler. Any other value but those two will cause os.kill to use TerminateProcess, outright killing the process. This change adds win_console_handler.py, which is a script to implement SetConsoleCtrlHandler and applicable handler function, using ctypes. subprocess also gets another attribute which is a necessary flag to creationflags in Popen in order to send the CTRL events.
* - Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.Matthias Klose2010-03-191-0/+5
|
* Fixes issue #7999: os.setreuid() and os.setregid() would refuse to acceptGregory P. Smith2010-03-011-6/+20
| | | | a -1 parameter on some platforms such as OS X.
* Fix for r78527. It left out updating forkpty.Gregory P. Smith2010-03-011-4/+7
|
* Issue #7242: On Solaris 9 and earlier calling os.fork() from within aGregory P. Smith2010-03-011-10/+19
| | | | | thread could raise an incorrect RuntimeError about not holding the import lock. The import lock is now reinitialized after fork.
* - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4Ronald Oussoren2010-01-171-0/+4
| | | | | | | | | | | | - Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on MacOSX. - Make configure look for util.h as well as libutil.h. The former is the header file that on OSX contains the defition of openpty. (Needed to compile for OSX 10.4 on OSX 10.6) - Use the correct definition of CC to compile the pythonw executable
* Fix possible integer overflow in lchown and fchown functions. For issue1747858.Gregory P. Smith2009-12-231-4/+5
|
* Issue #7333: The `posix` module gains an `initgroups()` function providingAntoine Pitrou2009-12-021-0/+27
| | | | | access to the initgroups(3) C library call on Unix systems which implement it. Patch by Jean-Paul Calderone.
* Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.Martin v. Löwis2009-11-271-0/+89
|
* Fix issue #1590864, multiple threads and fork() can cause deadlocks, byThomas Wouters2009-09-161-3/+31
| | | | | | | | | | | | | | | | | | | | | | 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 #4856: Py_GetFileAttributesEx[AW] are not needed because ↵Hirokazu Yamamoto2009-06-291-58/+2
| | | | | | | GetFileAttributesEx[AW] won't fail with ERROR_CALL_NOT_IMPLEMENTED on win NT. Reviewed by Amaury Forgeot d'Arc.
* Issue #4856: Remove checks for win NT.Hirokazu Yamamoto2009-06-281-324/+262
|
* Fix build under WindowsAntoine Pitrou2009-05-241-3/+1
|
* Some pid_t-expecting or producing functions were forgotten in r72852.Antoine Pitrou2009-05-231-11/+17
|
* Issue #1983: Fix functions taking or returning a process identifier to useAntoine Pitrou2009-05-231-16/+35
| | | | | 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.
* Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.Hirokazu Yamamoto2009-05-171-33/+25
|
* Issue #5913: os.listdir() should fail for empty path on windows.Hirokazu Yamamoto2009-05-041-6/+7
|
* Fixes issue5705: os.setuid() and friends did not accept the same range ofGregory P. Smith2009-04-051-17/+55
| | | | values that pwd.getpwnam() returns.
* http://bugs.python.org/issue5623Kristján Valur Jónsson2009-04-011-33/+24
| | | | | Dynamically discoverd the size of the ioinfo struct used by the crt for its file descriptors. This should work across all flavors of the CRT. Thanks to Amaury Forgeot d'Arc Needs porting to 3.1
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-2/+2
|
* Issue 4804. Add a function to test the validity of file descriptors on ↵Kristján Valur Jónsson2009-02-101-1/+125
| | | | Windows, and stop using global runtime settings to silence the warnings / assertions.
* simplify codeBenjamin Peterson2009-01-191-4/+2
|
* Issue 4957Kristján Valur Jónsson2009-01-191-1/+1
| | | | Let os.ftruncate raise OSError like documented.
* Issue #1040026: Fix os.times result on systems where HZ is incorrect.Martin v. Löwis2008-12-291-9/+16
|
* Issue #4071: ntpath.abspath returned an empty string for long unicode path.Hirokazu Yamamoto2008-11-081-6/+20
|
* removed unused _PyUnicode_FromFileSystemEncodedObject.Hirokazu Yamamoto2008-10-161-6/+2
| | | | made win32_chdir, win32_wchdir static.
* r66862 contained memory leak.Hirokazu Yamamoto2008-10-091-1/+3
|
* On windows, os.chdir given unicode was not working if GetCurrentDirectoryWHirokazu Yamamoto2008-10-091-1/+4
| | | | | returned a path longer than MAX_PATH. (But It's doubtful this code path is really executed because I cannot move to such directory on win2k)
* Issue #2222: Fixed reference leak when occured os.rename()Hirokazu Yamamoto2008-08-171-28/+26
| | | | fails unicode conversion on 2nd parameter. (windows only)
* Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,Martin v. Löwis2008-08-121-3/+4
| | | | | | | by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*.
* On Windows, silence a Purify warning and initialize the memory passed to ↵Amaury Forgeot d'Arc2008-07-211-0/+1
| | | | | | CryptGenRandom. Since python doesn't provide any particular random data, it seems more reasonable anyway.
* #1608818: errno can get set by every call to readdir().Georg Brandl2008-07-161-8/+10
|
* Fix posix.fork1() / os.fork1() to only call PyOS_AfterFork() in the childGregory P. Smith2008-07-141-1/+2
| | | | | | | | process rather than both parent and child. Does anyone actually use fork1()? It appears to be a Solaris thing but if Python is built with pthreads on Solaris, fork1() and fork() should be the same.
* Issue #2722. Now the char buffer to support the path string hasFacundo Batista2008-06-221-5/+24
| | | | | not fixed length, it mallocs memory if needed. As a result, we don't have a maximum for the getcwd() method.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-34/+34
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-34/+34
|
* #2890: support os.O_ASYNC and fcntl.FASYNC.Georg Brandl2008-05-161-0/+5
|
* Fix chown on 64-bit linux. It needed to take a long (64-bit on 64bit linux) asGregory P. Smith2008-03-181-2/+2
| | | | | | | | | uid and gid input to accept values >=2**31 as valid while still accepting negative numbers to pass -1 to chown for "no change". Fixes issue1747858. This should be backported to release25-maint.
* Remove all traces of HAVE_STRERROR.Brett Cannon2008-03-181-4/+0
| | | | | The removal of strerror.c led to the function check being removed from configure.in.
* #2063: correct order of utime and stime in os.times()Georg Brandl2008-02-131-2/+2
| | | | result on Windows.
* Another int -> pid_t caseChristian Heimes2008-02-031-1/+2
|
* The wrapper function is supposed to be for spawnvpe() so that'sAndrew MacIntyre2008-02-031-2/+2
| | | | | | what we should call [this wrapper only available on OS/2]. Backport candidate to 2.5.