Commit Graph

91 Commits

Author SHA1 Message Date
Barry Warsaw d58d7647f3 Several changes to support inclusion of filename in relevent
exceptions:

posix_error_with_filename(): New function which calls
PyErr_SetFromErrnoWithFilename()

The following methods have been changed to call
posix_error_with_filename():

    posix_1str()
    posix_strint()
    posix_strintint()
    posix_do_stat()
    posix_mkdir()
    posix_utime()
    posix_readlink()
    posix_open()

INITFUNC(): os.error (nee PosixError) is PyExc_OSError
1998-07-23 16:14:40 +00:00
Guido van Rossum b3f9f4b729 On Windows, make the pipe() call return Unix file descriptors instead
of Windows file handles.  Now it is at least compatible with itself on
Unix!
1998-06-12 15:05:15 +00:00
Guido van Rossum bfaf3d6186 Moved some #ifdefs around that got put in the wrong place by the
latest OS/2 patch set.
1997-12-29 20:02:27 +00:00
Guido van Rossum d48f252ce5 Another large batch of patches from Jeff Rush for OS/2.
I hope this time I've taken out all // comments and indended #ifdefs.
1997-12-05 22:19:34 +00:00
Guido van Rossum c5a0f532e7 Patch for QNX, by Chris Herborth. Also left-aligned preprocessor
directives and changed C++ comments to C comments.
1997-12-02 20:36:02 +00:00
Guido van Rossum 8e9ebfd337 os2 patch by Jeff Rush 1997-11-22 21:53:48 +00:00
Guido van Rossum 359bcaa539 This fix (across 4 files in 3 directories) solves a subtle problem with
signal handlers in a fork()ed child process when Python is compiled with
thread support.  The bug was reported by Scott <scott@chronis.icgroup.com>.

What happens is that after a fork(), the variables used by the signal
module to determine whether this is the main thread or not are bogus,
and it decides that no thread is the main thread, so no signals will
be delivered.

The solution is the addition of PyOS_AfterFork(), which fixes the signal
module's variables.  A dummy version of the function is present in the
intrcheck.c source file which is linked when the signal module is not
used.
1997-11-14 22:24:28 +00:00
Guido van Rossum 0cb96de269 Apply two changes, systematically:
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
    exception object.

(2) Remove all calls to Py_FatalError(); instead, return or
    ignore the errors -- the import code now checks PyErr_Occurred()
    after calling a module's init function, so it's no longer a
    fatal error for the initialization to fail.

Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().

I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
1997-10-01 04:29:29 +00:00
Guido van Rossum b6a4716298 Add strerror() interface. 1997-09-15 22:54:34 +00:00
Guido van Rossum c6ef204830 Added /**/ around #end tags 1997-08-21 02:30:45 +00:00
Guido van Rossum 6d8841c079 Added a bunch of XXX comments about things I'd like to see changed... 1997-08-14 19:57:39 +00:00
Guido van Rossum 98d9d09090 Added O_BINARY and O_TEXT (for Windows). 1997-08-08 21:48:51 +00:00
Roger E. Masse 0318fd6050 Moved the definition of posix_times__doc__ to outside of #ifdef HAVE_TIMES
so that MSVC 4.2 doesn't complain under NT.
1997-06-05 22:07:58 +00:00
Guido van Rossum ec4f4ac8c0 Added doc strings (Neil Schemenauer). 1997-06-02 22:20:51 +00:00
Guido van Rossum b9f866cb7c Enable putenv and waitpid (== wait4) for NeXT. 1997-05-22 15:12:39 +00:00
Guido van Rossum ba9d7c5612 Change the exception objects to have the string value "os.error"
instead "posix.error" or "nt.error".
1997-04-29 15:49:54 +00:00
Barry Warsaw 5ed19dcc0e posix_execve(): Accept any mapping protocol object for the env
argument, not hardwired to a dictionary.
1997-01-29 15:08:24 +00:00
Barry Warsaw 4a34209468 1. Export open(2) flag constants for every defined constant
2. Reworked error checking in initposix() and initnt().
1996-12-19 23:50:02 +00:00
Barry Warsaw 43d68b8fb0 Minor formatting changes. 1996-12-19 22:10:44 +00:00
Barry Warsaw 53699e9ec1 Renamed.
Note that there is no test suite for this module, and I don't plan to
write one just now.
1996-12-10 23:23:01 +00:00
Guido van Rossum a376cc5cc8 Keep gcc -Wall happy. 1996-12-05 23:43:35 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum 87755a24c2 Use #ifdef MS_WIN32 instead of _MSC_VER > 850. 1996-09-07 00:59:43 +00:00
Guido van Rossum f1af3fe8eb Added simple-minded (i.e. leaking :-) putenv() interface, if os has it. 1996-07-23 19:18:10 +00:00
Guido van Rossum c012547142 Added plock() system call.
Changed test for Windows times() emulation.
1996-06-28 18:55:32 +00:00
Guido van Rossum 8d665e6b51 changed windows test symbols; removed debug printf from sockets 1996-06-26 18:22:49 +00:00
Guido van Rossum fd03e2b4b1 Clear waitpid() status arg in case there's no process to report with
WNOHANG set.
1996-06-19 23:17:02 +00:00
Guido van Rossum 8bac546e11 Avoid core dump in resizestring() on read() with 0 bytes. 1996-06-11 18:38:48 +00:00
Guido van Rossum a0e71303d9 Changed NT -> MSC or WATCOM 1996-05-28 22:30:38 +00:00
Guido van Rossum a4916fa54f Added mkfifo, ftruncate. Windows/PC changes. 1996-05-23 22:58:55 +00:00
Guido van Rossum b0824db52c Made 2nd arg to mkdir optional 1996-02-25 04:50:32 +00:00
Guido van Rossum f4a5912d51 add remove==unlink; mark strftime as varargs 1996-02-13 00:12:56 +00:00
Guido van Rossum bbc3410fa8 added 5th return item, clock time, to posix.times() 1995-09-13 17:39:51 +00:00
Guido van Rossum 24f42ac74c suppress . and .. in listdir return value 1995-07-18 18:16:52 +00:00
Guido van Rossum 36bc68024f sys/wait.h; NeXT changes (no unistd, utime; getcwd?) 1995-06-14 22:54:23 +00:00
Guido van Rossum de4e124c9b add WNOHANG 1995-03-30 10:56:54 +00:00
Guido van Rossum 6f4f5f7892 some more changes for NT and Borland 1995-03-10 15:14:41 +00:00
Guido van Rossum ad0ee8369c changes for NT/Borland C 1995-03-01 10:34:45 +00:00
Guido van Rossum a38a503576 fix comment opener after #endif 1995-02-17 15:11:36 +00:00
Guido van Rossum d1b3481d69 correct typo in utime stub 1995-02-07 15:39:29 +00:00
Guido van Rossum f8803dd6c3 uname 64-bit fix 1995-01-26 00:37:45 +00:00
Guido van Rossum a6a1e536ac added bufsize parameter to fdopen and popen 1995-01-10 15:36:38 +00:00
Guido van Rossum 524b588553 Added 1995 to copyright message.
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
1995-01-04 19:10:35 +00:00
Guido van Rossum 3bbc62e9c2 Another bulky set of minor changes.
Note addition of gethostbyaddr() and improved repr() for sockets,
renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
1995-01-02 19:30:30 +00:00
Guido van Rossum 6493389a8c distinguish between getpgrp and setpgrp arg requirements 1994-10-20 21:56:42 +00:00
Guido van Rossum 14ed0b2cd3 * Modules/xxmodule.c: integrated with xxobject.c by Jack
* Modules/(posix,socket}module.c: more NT changes
1994-09-29 09:50:09 +00:00
Guido van Rossum b078ce10d4 Move #endif for NT 1994-08-29 14:01:43 +00:00
Guido van Rossum 794d81313b * Modules/posixmodule.c: some more NT changes 1994-08-23 13:48:48 +00:00
Guido van Rossum 6a3eb5f14d Changes to make it work and compile on NT, by Mark Hammond.
(NT changes for posixmodule.c re-invented by Guido.)
1994-08-18 15:42:46 +00:00
Guido van Rossum b6775db241 Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00