summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Backport r45505, r45573, r45576Martin v. Löwis2006-10-091-6/+7
| | | | | | | | | | | | | | | | | | - reset errno before calling confstr - use confstr() doc to simplify checks afterwards - Correct implementation and documentation of os.confstr. Add a simple test case. I've yet to figure out how to provoke a None return I can test. - Address issues brought up by MvL on python-checkins. I tested this with valgrind on amd64. The man pages I found for diff architectures are inconsistent on this. I'm not entirely sure this change is correct for all architectures either. Perhaps we should just over-allocate and not worry about it? The change to return None instead of "" in case of unconfigured values has not been backported.
* Port of universal binary support for Mac OSX from python 2.5. This takes awayRonald Oussoren2006-10-081-0/+49
| | | | | | | | the need for the out-of-tree universal binary support that was used to build the 2.4.3 installer. Missing here relative to that tree are some changes to IDLE, IMHO those patches aren't appropriate for the 2.4 branch and users are better of using 2.5's IDLE.
* [Backport r51223 | neal.norwitz]Andrew M. Kuchling2006-10-051-0/+2
| | | | | | | | If _stat_float_times is false, we will try to INCREF ival which could be NULL. Return early in that case. The caller checks for PyErr_Occurred so this should be ok. Klocwork #297
* [Backport rev. 39135 by mwh]Andrew M. Kuchling2006-09-281-0/+2
| | | | | | | | | | | | | | | | | | Fix bug [ 1232517 ] OverflowError in time.utime() causes strange traceback A needed error check was missing. (Actually, this error check may only have become necessary in fairly recent Python, not sure). Backport candidate. [A few lines below the code in 2.4 touched by the patch, there's already a similar check of (intval == -1 && PyErr_Occurred()), so I think this function can already report such errors, and therefore the fix still applies. Perhaps Michael can clarify what he was referring to. --amk]
* [Backport of rev. 42093 by neal.norwitz]Andrew M. Kuchling2006-09-271-0/+2
| | | | | | Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
* Bug #1551427: fix a wrong NULL pointer check in the win32 versionGeorg Brandl2006-09-061-1/+1
| | | | | of os.urandom(). (backport from rev. 51762)
* Bug #1524310: Properly report errors from FindNextFile in os.listdir.Martin v. Löwis2006-07-241-0/+14
|
* Backport of 46010Martin v. Löwis2006-05-161-5/+5
| | | | | - Test for sys/statvfs.h before including it, as statvfs is present on some OSX installations, but its header file is not.
* Backport trunk's r45715:Thomas Wouters2006-04-251-0/+4
| | | | | | | | | | Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses MAXPATHLEN-sized buffers for various output-buffers (like to realpath()), and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and does not define MAXPATHLEN.) Cursory googling suggests Linux is following a newer standard than BSD, but in cases like this, who knows. Using the greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the most portable solution.
* Clear errno before calling opendir() and readdir().Georg Brandl2006-04-111-0/+1
| | | | (backport from rev. 45262)
* Bug #1467952: backport: make os.listdir() raise if readdir() failsGeorg Brandl2006-04-111-0/+6
|
* Backport trunk's r43510: In the fdopen(fd, 'a') case on UNIX, don't try toThomas Wouters2006-03-311-1/+1
| | | | set fd's flags to -1 if fcntl() and fdopen() both fail.
* Add guards against fcntl() not being available on Windows.Georg Brandl2006-03-311-0/+4
| | | | (backport from rev. 43504)
* bug #1461855: make os.fdopen() add the O_APPEND flag if using "a" mode.Georg Brandl2006-03-311-2/+13
| | | | | | | glibc, for example, does this already on its own, but it seems that the solaris libc doesn't. This leads to Python code being able to over- write file contents even though having specified "a" mode. (backport from rev. 43501)
* Bug #869197: setgroups rejects long integer argumentGeorg Brandl2005-11-221-6/+31
|
* Commit memory leaking fix.Georg Brandl2005-09-251-2/+6
|
* Fix problems reported by valgrind:Neal Norwitz2005-09-191-1/+2
| | | | | | | * Fix memory leak in posix.access() * Fix use of uninitialized value in forkpty() - from the manpage it isn't clear if there are conditions where master_fd are uninitialized, but it's safer to initialize
* bug [ 1007046 ] os.startfile() doesn't accept Unicode filenamesGeorg Brandl2005-09-141-1/+2
|
* Backport of change to os.access to encode Unicode file names withMartin v. Löwis2005-03-131-1/+2
| | | | the file system encoding.
* fix unterminated commentAndrew MacIntyre2004-12-181-1/+1
|
* OS/2 specific fixes related to SF bug # 1003471.Andrew MacIntyre2004-12-121-68/+67
| | | | | | | Also revise a related function to minimise file handle/pipe leakage and improve reliability. Backported from -HEAD.
* Patch 977343, Solaris likes sys/loadavg.h. Added support for sys/loadavg.hAnthony Baxter2004-10-131-0/+4
| | | | detection to configure &c.
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-131-4/+4
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* Patch #1009075, bug #952953: allow execve with empty 2nd argumentArmin Rigo2004-09-271-12/+0
|
* win32_urandom(): There's no need to copy the generated byte string, soTim Peters2004-08-301-17/+11
| | | | don't.
* win32_urandom(): pass the function name to PyArg_ParseTuple, for betterTim Peters2004-08-301-1/+1
| | | | error msgs.
* win32_urandom(): Raise ValueError if the argument is negative.Tim Peters2004-08-301-0/+3
|
* win32_urandom(): Rewrite to Python C standards (hard tabs, function nameTim Peters2004-08-301-52/+59
| | | | in first column, no parens around return value).
* Patch #934711: Expose platform-specific entropy.Martin v. Löwis2004-08-291-1/+72
|
* Return unicode strings from _getfullpathname even on W9X. Fixes #924703 .Martin v. Löwis2004-06-151-0/+4
|
* Ensure path is initialized to prevent freeing random memoryNeal Norwitz2004-06-091-4/+2
| | | | | (reported by Thomas Heller). If have_unicode_filename is set, path looks like it will not be used, so there's no need to free it.
* Plug a few memory leaks in utime(). path is allocated from withinNeal Norwitz2004-06-061-4/+12
| | | | | | | PyArg_ParseTuple() since the format is "et" This change should be reviewed carefully. Bugfix candidate.
* Patch #954115: Fix os.stat handling of UNC roots.Martin v. Löwis2004-06-021-18/+94
| | | | Will backport to 2.3.
* Fix [ 947405 ] os.utime() raises bad exception for unicode filenamesMark Hammond2004-05-041-1/+6
|
* OS/2 has support for spawnvp() and spawnvpe() in the C libraries suppliedAndrew MacIntyre2004-04-041-0/+229
| | | | | | | with major C compilers (VACPP, EMX+gcc and [Open]Watcom). Also tidy up the export of spawn*() symbols in the os module to match what is found/implemented.
* OS/2 VACPP build updates/fixesAndrew MacIntyre2004-03-291-1/+1
|
* Fix docstrings to mention the correct functionNeal Norwitz2004-02-161-2/+2
|
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-2/+0
|
* Remove support for SunOS 4.Skip Montanaro2004-01-171-19/+0
| | | | Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
* Make parameter names in docstring more mnemonicAndrew M. Kuchling2004-01-161-1/+1
|
* FIx unicodefilename support of posix.uname(). This fixes test_unicode_fileHye-Shik Chang2004-01-041-1/+2
| | | | failure on FreeBSD.
* Fix [ 846133 ] os.chmod/os.utime/shutil do not work with unicode filenamesMark Hammond2003-12-031-3/+50
|
* Patch #839038: Add getsid(2).Martin v. Löwis2003-11-101-0/+22
|
* Patch #788404: ignore "b" and "t" mode modifiers in posix_popen.Martin v. Löwis2003-10-311-0/+5
| | | | Fixes #703198. Backported to 2.3.
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* Simplify and speedup uses of Py_BuildValue():Raymond Hettinger2003-10-121-4/+4
| | | | | | * Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c) * Py_BuildValue("()",a) --> PyTuple_New(0) * Py_BuildValue("O", a) --> Py_INCREF(a)
* Patch #730597: Disable POPEN for RTEMS.Martin v. Löwis2003-09-201-0/+2
|
* Patch #790000: Allow os.access to handle Unicode file name.Martin v. Löwis2003-09-121-0/+16
|
* SF patch #798534: Windows os.popen needlessly gets a reference to tuple ()Raymond Hettinger2003-09-011-3/+1
| | | | | | (Contributed by Andrew Gaul.) Fixes a minor leak.
* Demonstrate and fix [ 783882 ] os.lstat crashes with Unicode filename.Mark Hammond2003-08-061-1/+1
| | | | Will also check in on the 2.3 branch.