summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-2/+13
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* - Get _environ through the NSEnviron call in a MacOSX framework. This allowsJack Jansen2002-08-011-2/+11
| | | | | | | | | us to completely decouple the framework from the executable, so we can use a two-level namespace. - Do framework builds with a twolevel namespace. - Reorganized the code that creates the minimal framework in the build directory, to make it more robust against incomplete frameworks (from earlier aborted builds, or builds of previous Python versions).
* Revert changes to use PyArg_Parse(), so any sequence will continue to work ↵Neal Norwitz2002-07-301-1/+1
| | | | -- Spotted by Just van Rossum
* Use PyArg_ParseTuple() instead of PyArg_Parse() which is deprecatedNeal Norwitz2002-07-301-1/+1
|
* Fix docstring to be consistent with parameter name (prefix)Neal Norwitz2002-07-301-1/+1
|
* SF patch #584245, get python to link on OSF1 (Dec Unix)Neal Norwitz2002-07-301-2/+2
|
* Patch #573770: Implement lchown.Martin v. Löwis2002-07-281-0/+30
|
* /F revealed that ShellExecute() only requires shellapi.h, not theTim Peters2002-07-151-1/+2
| | | | full-blown windows.h, so changed accordingly.
* Fix bug 231273 - [windows] os.popen doens't kill subprocess when interruptedMark Hammond2002-07-141-1/+1
| | | | Don't pass CREATE_NEW_CONSOLE to CreateProcess(), meaning our child process is in the same "console group" and therefore interrupted by the same Ctrl+C that interrupts the parent.
* WINDOWS_LEAN_AND_MEAN: There is no such symbol, although a very fewTim Peters2002-07-141-1/+1
| | | | | | | MSDN sample programs use it, apparently in error. The correct name is WIN32_LEAN_AND_MEAN. After switching to the correct name, in two cases more was needed because the code actually relied on things that disappear when WIN32_LEAN_AND_MEAN is defined.
* Patch #569753: Remove support for WIN16.Martin v. Löwis2002-06-301-91/+22
| | | | Rename all occurrences of MS_WIN32 to MS_WINDOWS.
* Clean up docstrings:Fred Drake2002-06-201-110/+105
| | | | | | | - Include a blank line between the signature line and the description (Guido sez). - Don't include "-> None" for API functions that always return None because they don't have a meaningful return value.
* Corect speling and add \n\ to line ends in new docstring for access().Guido van Rossum2002-06-181-5/+5
|
* Clarified documentation for os.access().Fred Drake2002-06-181-1/+5
| | | | | Patch contributed by Sean Reifschneider. Closes SF patch #570618.
* Use new PyDoc_STRVAR macroNeal Norwitz2002-06-131-2/+2
|
* Patch #568235: Add posix.setpgid.Martin v. Löwis2002-06-131-0/+22
|
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-222/+228
|
* SF bug 563750 (Alex Martelli): posix_tmpfile():Guido van Rossum2002-06-101-1/+1
| | | | | | | The file returned by tmpfile() has mode w+b, so use that in the call to PyFile_FromFile(). Bugfix candidate.
* Rename posix_WCONTINUED to posix_WIFCONTINUED, call WIFCONTINUED inside,Martin v. Löwis2002-05-041-2/+5
| | | | add it to the posix_methods.
* WCOREDUMP(), WIFCONTINUED(), WCONTINUED, WUNTRACED: New.Fred Drake2002-04-231-11/+75
| | | | | isatty(), WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(): Changed to return bools instead of ints.
* #546163, fix link problem on Solaris 8 for makedev when using mknodNeal Norwitz2002-04-201-0/+3
|
* #546155, remove posix_int() it is not usedNeal Norwitz2002-04-191-16/+0
|
* posix_fildes(): New helper: run a function that takes a file descriptorFred Drake2002-04-151-52/+71
| | | | | | | | | | | | | | | | | | and returns None. This allows any object that supports the fileno() method to be passed as a file descriptor, not just an integer. posix_fchdir(): New exposed function: implements posix.fchdir(). This closes SF feature #536796. posix_fsync(), posix_fdatasync(): Convert to use posix_fildes() instead of posix_int(). This also changes them from METH_VARARGS to METH_O functions. setup_confname_table(): Remove unused variable. Change to take a module rather than a dict to save the resulting table into. setup_confname_tables(): Change to take a module instead of a dict to pass to setup_confname_table().
* Patch #543447: Add posix.mknod.Martin v. Löwis2002-04-141-4/+40
|
* Fix bugs:Mark Hammond2002-04-031-1/+7
| | | | | | | | | | | | | | | 457466: popenx() argument mangling hangs python 226766: popen('python -c"...."') tends to hang Fixes argument quoting in w9xpopen.exe for Windows 9x. w9xpopen.exe also never attempts to display a MessageBox when not executed interactively. Added test_popen() test. This test currently just executes "python -c ..." as a child process, and checks that the expected arguments were all recieved correctly by the child process. This test succeeds for me on Win9x, win2k and Linux, and I hope it does for other popen supported platforms too :)
* 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.