| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
|
|
|
| |
not ever see!
|
|
|
|
|
|
|
| |
implementation. You don't want to know. I've asked Guido to give this
a critical review (we agreed on the approach, but the implementation
proved more ... interesting ... than anticipated). This will almost
certainly be the highlight of Mark Hammond's day <wink>.
|
|
|
|
|
|
|
|
|
| |
Minor updates for BeOS R5.
Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding
change in BeOS/README (by Fred).
This closes SourceForge patch #100978.
|
|
|
|
| |
The existing win32_error() function now returns the new(ish) WindowsError, ensuring we get correct error messages.
|
|
|
|
|
| |
This is an enhancement to a prior patch (100941) ...
[T]his patch removes the risk of deadlock waiting for the child previously present in certain cases. It adds tracking of all file handles returned from an os.popen* call and only waits for the child process, returning the exit code, on the closure of the final file handle to that child.
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
|
| |
underlying process has terminated
(bug fix from David Bolen)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for systems that are missing those declarations from system include files.
Start by moving a pointy-haired ones from their previous locations to the
new section.
(The gethostname() one, for instance, breaks on several systems, because
some define it as (char *, size_t) and some as (char *, int).)
I purposely decided not to include the summary of used #defines like Tim did
in the first section of pyport.h. In my opinion, the number of #defines
likedly to be used by this section would make such an overview unwieldy. I
would suggest documenting the non-obvious ones, though.
|
|
|
|
|
|
| |
return the exit code. Only works on Windows NT/2000, due to
limitations in the Win9X shell.
(based on patch #100941 by David Bolen)
|
|
|
|
| |
possible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.
All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:
long
func(a, b)
long a;
long b; /* flagword */
{
and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
|
|
|
|
|
|
|
| |
posix.openpty(). And conveniently also check if CVS write access really
works.
Closes SF patch #100722
|
|
|
|
| |
os.seteuid(), os.setegid(), os.setreuid(), os.setregid().
|
| |
|
| |
|
|
|
|
| |
for #100836, but implemented in a different way)
|
|
|
|
|
|
|
|
| |
(write, read, ...), based on feedback from GvR.
- added tuple-swapping code to popen2.py
- fixed some runaway indentation in posixmodule.c
|
|
|
|
|
|
|
|
|
|
|
|
| |
windows.
- added optional mode argument to popen2/popen3
for unix; if the second argument is an integer,
it's assumed to be the buffer size.
- changed nt.popen2/popen3/popen4 return values
to match the popen2 module (stdout first, not
stdin).
|
|
|
|
|
| |
for the moment, this argument must be left out or set
to -1 (only the default bufsize is supported, that is)
|
|
|
|
|
|
|
| |
by Bill Tutt.
note: to run this on Windows 95/98, you need to have the
w9xpopen.exe helper in the same directory as the python DLL.
|
|
|
|
|
|
|
| |
cast to make sure Py_BuildValue gets the right thing.
this change eliminates bogus return codes from successful
spawn calls (e.g. 2167387144924954624 instead of 0).
|
|
|
|
|
|
|
|
|
|
| |
staring at the diffs before checking this one in. let me know
asap if it breaks things on your platform.
-- ANSI-fying
(patch #100763 by Peter Schneider-Kamp, minus the
indentation changes and minus the changes the broke
the windows build)
|
|
|
|
|
|
|
|
|
|
|
|
| |
In posixmodule.c:posix_fork, the function PyOS_AfterFork is called for
both the parent and the child, despite the docs stating that it should
be called in the new (child) process.
This causes problems in the parent since the forking thread becomes the
main thread according to the signal module.
Calling PyOS_AfterFork() only in the child fixes this. Changed for both
fork() and forkpty().
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the posix module for large file support mainly on
Win64, although some general cleanup is done as well.
The changes are:
- abstract stat->STAT, fstat->FSTAT, and struct stat->STRUCT_STAT
This is because stat() etc. are not the correct functions to use on
Win64 (nor maybe on other platforms?, if not then it is now trivial to
select the appropriate one). On Win64 the appropriate system functions
are _stati64(), etc.
- add _pystat_fromstructstat(), it builds the return tuple for the
fstat system call. This functionality was being duplicated. As well
the construction of the tuple was modified to ensure no overflow of
the time_t elements (sizeof(time_t) > sizeof(long) on Win64).
- add overflow protection for the return values of posix_spawnv and
posix_spawnve
- use the proper 64-bit capable lseek() on Win64
- use intptr_t instead of long where appropriate from Win32/64 blocks
(sizeof(void*) > sizeof(long) on Win64)
This closes SourceForge patch #100513.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|