Commit Graph

39 Commits

Author SHA1 Message Date
Guido van Rossum
65d5b5763c Thanks to Chris Herborth, the thread primitives now have proper Py*
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py names).
1998-12-21 19:32:43 +00:00
Guido van Rossum
3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum
49b560698b Renamed thread.h to pythread.h. 1998-10-01 20:42:43 +00:00
Guido van Rossum
1b236768e7 When we have siginterrupt(), use it to disable restarting interrupted
system calls.
1998-09-21 14:46:00 +00:00
Barry Warsaw
1ee36ffca0 (pause_doc): Sun CC complains about newline in string literal 1998-07-21 22:41:18 +00:00
Guido van Rossum
911ec188c8 # Added missing semicolon (was #ifdef'ed out in edit on Windows). 1998-06-28 17:00:19 +00:00
Guido van Rossum
1d8fb2d894 Added doc strings. 1998-06-28 16:54:49 +00:00
Guido van Rossum
a5e54d02a0 Use (void) to throw away a function result, not (void *) ! 1998-05-01 18:58:59 +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
7ff20ac9c7 Change the signal finialization so that it also resets the signal
handlers.  After this has been called, our signal handlers are no
longer active!
1997-11-03 21:53:55 +00:00
Guido van Rossum
1171ee6aaf Added configuration tests for presence of alarm(), pause(), and getpwent() 1997-08-22 20:42:00 +00:00
Guido van Rossum
08c166152e Add finialization routines; fixed some memory leaks related to this.
Reset the SIGINT handler when the finalization is invoked.
1997-08-02 03:01:42 +00:00
Guido van Rossum
295b8e5608 Add sys/types.h include for pid_t when threading. 1997-06-06 21:16:41 +00:00
Guido van Rossum
644a12b00c Tweaks to keep the Microsoft compiler quier. 1997-04-09 19:24:53 +00:00
Guido van Rossum
c1cc8ab1a4 djgpp fix (SIGMAX). 1997-02-14 16:35:36 +00:00
Guido van Rossum
fcdd0e40a4 Arrange for PyErr_CheckSignals() to be called via Py_AddPendingCall().
This avoids having to call sigcheck() (the same routine by its old
name :-) in the ticker code in ceval.c's main interpreter loop.
1997-01-21 06:13:09 +00:00
Barry Warsaw
73a75eb79b initsignal(): Py_DECREFs really should be Py_XDECREFs in case the
PyInt_FromLong's failed.
1997-01-09 23:50:28 +00:00
Barry Warsaw
929711765e Several changes:
- Conform to standard Python C coding styles.

- All static symbols were renamed and shorted.

- Eyeballed all return values and memory references.

- Fixed a bug in signal.pause() so that exceptions raised in signal
  handlers are now properly caught after pause() returns.

- Removed SIGCPU and SIGFSZ.  We surmise that these were typos for the
  previously missing SIGXCPU and SIGXFSZ.
1997-01-03 00:14:25 +00:00
Barry Warsaw
14ed5fb1ec initsignal(): Added SIGXCPU and SIGXFSZ. Left in the definitions for
SIGCPU and SIGFSZ but we're (Jeremy and I) are actually unsure whether
these were typos or if there are systems that use these alternate
names.  We've checked Solaris, SunOS, and IRIX; they contain only the
SIGX* names.
1996-12-16 20:24:22 +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
1835c4f1b4 Use correct field of sigaction struct 1996-05-29 14:15:19 +00:00
Guido van Rossum
fb0df944ca Use sigaction if possible 1996-05-23 22:55:35 +00:00
Guido van Rossum
f4b012a9e0 use PyCallable_Check; split some lines 1995-03-16 15:43:29 +00:00
Guido van Rossum
06d511ddf5 added PyErr_SetInterrupt(); NT ifdefs 1995-03-10 15:13:48 +00:00
Guido van Rossum
ec25b91ba3 rename sigcheck so signal handling works again 1995-01-22 00:46:57 +00:00
Guido van Rossum
a3c04b003f cosmetics 1995-01-12 11:29:01 +00:00
Guido van Rossum
a597dde3f1 cosmetic changes so these modules will work with the strict new naming scheme 1995-01-10 20:56:29 +00:00
Guido van Rossum
9558825dad do not call newmethodobject directly 1995-01-07 11:50:04 +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
602099a756 * various modules: #include "Python.h" and remove most remporary
renaming hacks
1994-09-14 13:32:22 +00:00
Guido van Rossum
e4485b064d Setup.in: added tkinter; rearranged the definition of PYTHONPATH so
that the module-specific components are in the section for that
module.

cursesmodule.c: patched it so it actually works.

tkintermodule.c: call Py_AtExit instead of atexit().

signalmodule.c: converted to new naming style; added
BGN/END SAVE around pause() call.

socketmodule.c: added setblocking() after Tommy Burnette.
1994-09-07 14:32:49 +00:00
Guido van Rossum
aa0f4c73e5 * Modules/signalmodule.c: added pause(). 1994-08-23 13:49:37 +00:00
Guido van Rossum
b6775db241 Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00
Guido van Rossum
bb4ba12242 * Modules/signalmodule.c: added thread compatibility (only main
thread uses signals); much improved efficiency; intrcheck()
doesn't call sigcheck() but only tests and clears the SIGINT
tripped flag.
1994-06-23 11:25:45 +00:00
Guido van Rossum
6299d1ee03 Speed up checking for signals and define intrcheck differently 1994-05-31 12:51:13 +00:00
Guido van Rossum
398d9fec3c New experimental modules -- signal and sybase 1994-05-11 08:59:13 +00:00