Commit Graph

59 Commits

Author SHA1 Message Date
Fred Drake dff3a37afd Make more warnings go away on the SGI compiler.
This is part of SF patch #424992.
2001-07-19 21:29:49 +00:00
Martin v. Löwis f58de1bd67 Document SIG_* warning causes on Solaris. 2001-03-06 12:13:56 +00:00
Guido van Rossum 9e8181b809 Make better use of GNU Pth -- patch by Andy Dustman.
I can't test this, so I'm just checking it in with blind faith in Andy.
I've tested that it doesn't broeak a non-Pth build on Linux.

Changes include:

- There's a --with-pth configure option.

- Instead of _GNU_PTH, we test for HAVE_PTH.

- Better signal handling.

- (The config.h.in file is regenerated in a slightly different order.)
2000-09-19 00:46:46 +00:00
Guido van Rossum d2cd7adf6f Use typedef PyOS_sighandler_t and APIs PyOS_getsig() and
PyOS_setsig(), instead of directly calling signal() or sigaction().

This fixes the second half of bug #110611: the mysterious ignoring of
the first ^C when readline isn't used.
2000-09-16 16:35:28 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Guido van Rossum fee3a2dd8c Charles Waldman's patch to reinitialize the interpreter lock after a
fork.  This solves the test_fork1 problem.  (ceval.c, signalmodule.c,
intrcheck.c)

SourceForge: [ Patch #101226 ] make threading fork-safe
2000-08-27 17:34:07 +00:00
Andrew M. Kuchling a1abb728bc Use METH_OLDARGS instead of numeric constant 0 in method def. tables 2000-08-03 02:34:44 +00:00
Thomas Wouters 334fb8985b Use 'void' directly instead of the ANY #define, now that all code is ANSI C.
Leave the actual #define in for API compatibility.
2000-07-25 12:56:38 +00:00
Tim Peters 4f1b2081e9 Removed all instances of RETSIGTYPE from the source code: signal
handlers "return void", according to ANSI C.
Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro.
Left RETSIGTYPE in the config stuff, because it's not clear to
me that others aren't relying on it (e.g., extension modules).
2000-07-23 21:18:09 +00:00
Tim Peters e21107145a Missed a return from a signal handler -- thanks to /F for pointing
it out!
2000-07-23 18:33:52 +00:00
Tim Peters 1be46844d9 Recent ANSIfication introduced a couple instances of
#if RETSIGTYPE != void
That isn't C, and MSVC properly refuses to compile it.
Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h
to expand to the correct thing based on RETSIGTYPE.  However,
only void is ANSI!  Do we still have platforms that return int?
The Unix config mess appears to #define RETSIGTYPE by magic
without being asked to, so I assume it's "a problem" across
Unices still.
2000-07-23 18:10:18 +00:00
Thomas Wouters 0796b00279 Further ANSIfication of functionpointers and declarations. Also, make sure
to return something if RETSIGTYPE isn't void, in functions that are defined
to return RETSIGTYPE. Work around an argumentlist mismatch ('void' vs.
'void *') by using a static wrapper function.
2000-07-22 23:49:30 +00:00
Thomas Wouters f3f33dcf03 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
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 ;)
2000-07-21 06:00:07 +00:00
Peter Schneider-Kamp e89b15691e ANSI-fication 2000-07-10 12:04:18 +00:00
Tim Peters dbd9ba6a6c Nuke all remaining occurrences of Py_PROTO and Py_FPROTO. 2000-07-09 03:09:57 +00:00
Marc-André Lemburg 8bcfb8a5e0 Fixed symbol search for defining NSIG. It now also checks _NSIG
which some C libs define (e.g. glibc).

Added a fallback default value for NSIG which hopefully provides
enough room for signal slots.
2000-07-04 14:17:33 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Guido van Rossum 276fa43faf Fix another error on AIX by using a proper cast. 2000-06-30 23:04:18 +00:00
Guido van Rossum cc6a438d7f Trent Mick:
Fix warnings on 64-bit build build of signalmodule.c

- Though I know that SIG_DFL and SIG_IGN are just small constants,
there are cast to function pointers so the appropriate Python call is
PyLong_FromVoidPtr so that the pointer value cannot overflow on Win64
where sizeof(long) < sizeof(void*).
2000-06-28 22:26:21 +00:00
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