| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the openpty() and forkpty() library calls to posixmodule.c,
when they are available on the target
system. (glibc-2.1-based Linux systems, FreeBSD and BSDI at least, probably
the other BSD-based systems as well.)
Lib/pty.py is also rewritten to use openpty when available, but falls
back to the old SGI method or the "manual" BSD open-a-pty
code. Openpty() is necessary to use the Unix98 ptys under Linux 2.2,
or when using non-standard tty names under (at least) BSDI, which is
why I needed it, myself ;-) forkpty() is included for symmetry.
|
|
|
|
|
| |
Fix a small bug in posixmodule.c where a char* is being
dereferenced where it should not be.
|
|
|
|
|
| |
Removed PyErr_BadArgument() calls and replaced them with more useful
error messages.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checkin 2.131 of posixmodule.c changed os.stat on Windows, so that
"/bin/" type notation (trailing backslash) would work on Windows to
be consistent with Unix.
However, the patch broke the simple case of: os.stat("\\")
This did work in 1.5.2, and obviously should!
This patch addresses this, and restores the correct behaviour.
|
|
|
|
|
|
| |
utime(path, NULL) call, setting the atime and mtime of the file to the
current time. The previous signature utime(path, (atime, mtime)) is
of course still allowed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes posixmodule.c:execv to
a) check for zero length args (does this to execve, too), raising
ValueError.
b) raises more rational exceptions for various flavours of duff arguments.
I *hate*
TypeError: "illegal argument type for built-in operation"
It has to be one of the most frustrating error messages ever.
|
|
|
|
|
|
|
|
|
|
| |
backslash from the pathname argument to stat() on Windows -- while on
Unix, stat("/bin/") succeeds and does the same thing as stat("/bin"),
on Windows, stat("\\windows\\") fails while stat("\\windows") succeeds.
This modified version of the patch recognizes both / and \.
(This is odd behavior of the MS C library, since
os.listdir("\\windows\\") succeeds!)
|
|
|
|
| |
inserted dictionary values. Also, simplified the logic a bit.
|
|
|
|
| |
in scope on systems where mode_t isn't the same size as int...
|
| |
|
|
|
|
|
|
|
|
|
| |
(1) In opendir(), don't call the lock-release macros; we're
manipulating list objects and that shouldn't be done in unlocked
state.
(2) Don't use posix_strint() for chmod() -- the mode_t arg might be a
64 bit int (reported by Nick Maclaren).
|
|
|
|
|
| |
and USE_TMPNAM_R at the top of the file and refer to them later; this
catches a second reference to 'tmpnam_r' that I didn't spot first time around.
|
|
|
|
| |
building a threaded Python.
|
|
|
|
|
| |
just a typo in some Linux header; the real symbol is
_SC_AIO_LISTIO_MAX.
|
|
|
|
| |
is defined...
|
|
|
|
|
|
|
| |
building the dicts used to inform the user about the defined
constants when using the *conf*() APIs.
Thanks to Mark Hammond <mhammond@skippinet.com.au>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
strings to integers for the *conf*() functions.
Added code to sort the tables at module initialization. Three
dictionaries, confstr_names, sysconf_names, and pathconf_names, are
added to the module as well. These map known configuration setting
names to the numeric value which is used to represent the setting in
the system call. This code is always called.
Updated related comments.
|
|
|
|
|
|
|
|
| |
pathconf() names, from Sjoerd.
Added code to verify that these tables are properly ordered, only
included and used when CHECK_CONFNAME_TABLES is defined. This is only
needed to test the tables, so I haven't enabled this by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
available since the interface is poorly defined on at least one major
platform (Solaris).
Moved table of constant names for fpathconf() & pathconf() into the
conditional that defines the conv_path_confname() helper; Mark Hammond
reported that defining the table when none of the constants were
defined causes the compiler to complain (won't allow 0-length array,
imagine that!).
In posix_fpathconf(), use conv_path_confname() as the O& conversion
function, instead of the conv_confname() helper, which has the wrong
signature (posix_pathconf() already used the right thing).
|
| |
|
|
|
|
|
|
|
| |
and sysconf().
*Lots* of tables to define names used by *conf*(); explanation to go
in message to python-dev list.
|
|
|
|
|
|
|
|
|
| |
and TMP_MAX.
Converted all functions that used PyArg_Parse() or PyArg_NoArgs() to
use PyArg_ParseTuple() and specified all function names using the
:name syntax in the format strings, to allow better error messages
when TypeError is raised for parameter type mismatches.
|
|
|
|
| |
before it reveals the needed definitions in sys/statvfs.h.
|
|
|
|
|
|
| |
environment variable repeatedly. I posted this to the list
some time ago, but only now got around to asking g--d- what he
thought about it.
|
|
|
|
|
|
| |
Treat them as read-only, and make a copy as appropriately. This was
first reported by Bill Janssend and later by Craig Rowland and Ron
Sedlmeyer. This fix is mine.
|
|
|
|
|
|
|
|
| |
different values in the environ dict with the same key (although he
couldn't explain exactly how this came to be). Since getenv() uses
the first one, Python should do too. (Some doubts about case
sensitivity, but for now this at least seems the right thing to do
regardless of platform.)
|
|
|
|
|
|
| |
posix_error_with_filename() instead of posix_error(), passing in the
name argument, so you get information on which directory was being
listed.
|
| |
|
| |
|
|
|
|
| |
actual code does not allow such an argument. (Finn Bock.)
|
|
|
|
| |
underscore after all, for consistency with the O_* symnbols.
|
|
|
|
| |
os.times().
|
|
|
|
|
|
| |
was just an alias for PyExc_OSError and the way we were doing it was
causing a (small) memory leak anyway. Just use PyExc_OSError
everywhere.
|
|
|
|
|
|
| |
f_fsid field, since it's not a scalar on all systems supporting this
call (in particular, it's a tuple of two longs on AIX). Since it's
not particularly useful, just nuke it. Adapted the doc strings too.
|
|
|
|
| |
a process exit status as a parameter.
|
| |
|
| |
|
|
|
|
| |
this doesn't exist everywhere, so go back to using #ifdef NeXT.
|
| |
|
| |
|
|
|
|
| |
Also define F_OK etc. when not already defined, when doing access().
|
|
|
|
|
| |
anywhere (or, more likely, the declaration requires a magical
combination of _POSIX defines).
|
|
|
|
| |
HAVE_* macros set by configure script.
|
|
|
|
| |
Patch (again) by Sean Reifschneider.
|
|
|
|
| |
Also added access() and ttyname() by Sean Reifschneider.
|
|
|
|
| |
on BeOS or Windows.
|
| |
|
|
|
|
| |
Patch by Jeff Rush.
|
|
|
|
|
| |
ERROR_FILE_NOT_FOUND, return an empty list instead of raising an
exception.
|
| |
|