summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Handle os.listdir("") case correctly on Windows. Closes bug 500705.Neil Schemenauer2002-03-221-4/+5
|
* Update docstrings to use te attribute names of the new structures returnedFred Drake2002-03-121-2/+4
| | | | | by stat and time functions. This closes SF patch #523271.
* Python no longer compiled on Windows, due to #include file confusionTim Peters2002-03-031-4/+5
| | | | | | over SEP, ALTSEP and MAXPATHLEN. Patched up posixmodule.c for MSVC, but unsure what the story is now on other non-Unixish platforms -- the preprocessor maze has no exit <wink>.
* OS/2 EMX port changes (Modules part of patch #450267):Andrew MacIntyre2002-03-031-17/+702
| | | | | | | | | | Modules/ posixmodule.c - use SEP,ALTSEP #defines instead of hard coded path separator chars - use EMX specific variants of chdir2(),getcwd() that support drive letters - OS/2+EMX spawnv(),spawnve() support - EMX specific popen[234]() derived from Win32 popen[234]() code
* Patch #511193: Implement killpg in posixmodule.Martin v. Löwis2002-02-161-0/+21
|
* Got rid of a few more NeXT ifdefs. The last, I think.Jack Jansen2002-02-011-92/+0
|
* Implement os.waitpid() for Windows, in a way that's compatible with LinuxTim Peters2002-02-011-2/+28
| | | | | | where their capabilities intersect. Would be nice if people using non- MSVC compilers (Borland etc) took a whack at doing something similar for them (this code relies on the MS _cwait function).
* Expose more MS WIndows constants usable w/ low-level os.open().Tim Peters2002-01-301-102/+125
|
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-9/+0
|
* Due to a cut-and-paste error, the type object exported under the nameGuido van Rossum2001-12-271-1/+1
| | | | | | statvfs_result was in fact the stat_result type object. :-( 2.2.1 bugfix!
* SF bug #495021: Crash calling os.stat with a trailing backslashTim Peters2001-12-191-14/+20
| | | | | | | Patch from Mark Hammond, plus code rearrangement and comments from me. posix_do_stat(): Windows-specific code could try to free() stack memory in some cases when a path ending with a forward or backward slash was passed to os.stat().
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-0/+2
| | | | | | | | | | | | | type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.
* SF patch #489173: Make os.spawnv not block the interpreter, fromTim Peters2001-12-071-3/+10
| | | | | | | | | | | | Anthony Roach. Release the global interpreter lock around platform spawn calls. Bugfix candidate? Hard to say; I favor "yes, bugfix". These clearly *should* have been releasing the GIL all along, if for no other reason than compatibility with the similar os.system(). But it's possible some program out there is (a) multithreaded, (b) calling a spawn function with P_WAIT, and (c) relying on the spawn call to block all their threads until the spawned program completes. I think it's very unlikely anyone is doing that on purpose, but someone may be doing so by accident.
* posix_execve(), posix_spawnve(), posix_putenv():Tim Peters2001-12-031-6/+14
| | | | | sprintf -> PyOS_snprintf. This is the last of this stuff I intend to do.
* More sprintf -> PyOS_snprintf.Tim Peters2001-11-281-3/+3
|
* Repair a botched PyOS_snprintf conversion.Tim Peters2001-11-281-1/+1
|
* sprintf -> PyOS_snprintf in some "obviously safe" cases.Tim Peters2001-11-281-3/+5
| | | | | Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
* Fixes for possible buffer overflows in sprintf() usages.Marc-André Lemburg2001-11-281-1/+1
|
* Correct typo. Fixes #484611.Martin v. Löwis2001-11-241-1/+1
|
* Patch #474169: Move fdopen calls out of critical section.Martin v. Löwis2001-11-021-4/+8
|
* SF patch #460805 by Chris Gonnerman: Support for unsetenv()Guido van Rossum2001-10-191-0/+34
| | | | | | | | This adds unsetenv to posix, and uses it in the __delitem__ method of os.environ. (XXX Should we change the preferred name for putenv to setenv, for consistency?)
* Expose O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.Martin v. Löwis2001-10-181-0/+17
|
* Don't leave bare newlines in long strings -- VC doesn't like that.Guido van Rossum2001-10-181-3/+3
|
* SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.Guido van Rossum2001-10-181-68/+178
| | | | | | | | | | | | | | | | | This is a big one, touching lots of files. Some of the platforms aren't tested yet. Briefly, this changes the return value of the os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the time functions localtime(), gmtime(), and strptime() from tuples into pseudo-sequences. When accessed as a sequence, they behave exactly as before. But they also have attributes like st_mtime or tm_year. The stat return value, moreover, has a few platform-specific attributes that are not available through the sequence interface (because everybody expects the sequence to have a fixed length, these couldn't be added there). If your platform's struct stat doesn't define st_blksize, st_blocks or st_rdev, they won't be accessible from Python either. (Still missing is a documentation update.)
* Shut up warnings for setgroups() on Linux -- you have to #includeGuido van Rossum2001-10-181-0/+5
| | | | <grp.h> it seems. This requires yet another configure test.
* Expose setgroups. Fixes feature request #468116.Martin v. Löwis2001-10-181-0/+48
|
* Add chroot call. Implements feature #459267.Martin v. Löwis2001-10-041-0/+15
|
* Enable large file support on Win32 systems.Tim Peters2001-09-061-3/+3
| | | | | | | | | Curious: the MS docs say stati64 etc are supported even on Win95, but Win95 doesn't support a filesystem that allows partitions > 2 Gb. test_largefile: This was opening its test file in text mode. I have no idea how that worked under Win64, but it sure needs binary mode on Win98. BTW, on Win98 test_largefile runs quickly (under a second).
* SF bug [#456252] Python should never stomp on [u]intptr_t.Tim Peters2001-08-291-4/+4
| | | | | | | | | | | pyport.h: typedef a new Py_intptr_t type. DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is available as well as uintptr_t. If that turns out not to be true, things must get uglier (C99 wants both, so I think it's an assumption we're *likely* to get away with). thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented as returning unsigned long; no idea why uintptr_t was being used. Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
* SF patch [ #455137 ] Makes popen work with COMMAND.COM on WNT, fromTim Peters2001-08-271-9/+22
| | | | Brian Quinlan.
* added warnings about security risk of using tmpnam and tempnamSkip Montanaro2001-08-181-0/+10
|
* Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.Martin v. Löwis2001-07-261-1/+1
|
* Remove warnings from the SGI compiler.Fred Drake2001-07-191-1/+1
| | | | This is part of SF patch #434992.
* On Windows, tempnam() is spelled with a leading underscore.Fred Drake2001-07-171-0/+4
|
* Re-do the broken-nice() patch to break less platforms. Hopefully none :PThomas Wouters2001-07-111-3/+9
| | | | | | | Also note that it isn't just Linux nice() that is broken: at least FreeBSD and BSDI also have this problem. os.nice() should probably just be emulated using getpriority()/setpriority(), if they are available, but I'll get to that later.
* Patch #439995 (slightly modified from the uploaded version):Thomas Wouters2001-07-111-1/+18
| | | | | | | Work around Linux's nonstandard nice() systemcall, which does not return the new priority. This closes SF bug #439990.
* SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.Tim Peters2001-05-141-10/+8
|
* Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a ↵Mark Hammond2001-05-141-10/+0
| | | | fileobject.h, and initialize it in bltinmodule.
* Add support for Windows using "mbcs" as the default Unicode encoding when ↵Mark Hammond2001-05-131-40/+99
| | | | dealing with the file system. As discussed on python-dev and in patch 410465.
* Make some private symbols static.Guido van Rossum2001-04-141-1/+1
|
* Unixware 7 support by Billy G. Allie (SF patch 413011)Guido van Rossum2001-04-111-0/+30
|
* conditionally include unistd.h to pick up confstr declaration. attempt toSkip Montanaro2001-02-271-0/+5
| | | | | squelch warning from GCC 2.95.2 on Solaris - partially addresses bug #232787.
* Add a few more missing prototypes to the SunOS 4.1.4 section (no SFThomas Wouters2001-02-151-0/+3
| | | | | bugreport, just an IRC one by Marion Delgado.) These prototypes are necessary because the functions are tossed around, not just called.
* Partial fix to [ Bug #128685 ] popen on Win9x isnt smart enough about ↵Mark Hammond2001-01-311-9/+45
| | | | | | | | finding w9xpopen.exe. "Partial" as the code uses sys.prefix in an attempt to locate 'w9xpopen.exe', but sys.prefix is not set if Python can't find it itself. So this _still_ fails in Pythonwin, but I am committing the patch for 2 reasons: * Embedded apps that set sys.prefix or use PYTHONHOME will work * The exception raised on failure to find the executable is far more obvious
* Fix Bug #125891 - os.popen2,3 and 4 leaked file objects on Windows.Mark Hammond2001-01-311-0/+5
|
* Plug memory leak.Neil Schemenauer2001-01-161-1/+2
|
* Anonymous SF bug report #128053 point out that the #ifdef forGuido van Rossum2001-01-081-1/+1
| | | | | including "tmpfile" in the posix_methods[] array is wrong -- should be HAVE_TMPFILE, not HAVE_TMPNAM.
* Trivial typo fix, submitted by Charles Waldman (SF patch #102794).Guido van Rossum2000-12-121-1/+1
|
* posix_getlogin(): Be more cautious about interpreting a NULL fromFred Drake2000-12-061-1/+1
| | | | | getlogin() -- it is not clear that a NULL is always an error.
* posix_getlogin(): Handle the possibility that getlogin() can returnFred Drake2000-12-061-3/+12
| | | | | | | NULL without setting errno; observed on Linux Mandrake 7.2 by an anonymous user. This closes bug #124758.