Commit Graph

83 Commits

Author SHA1 Message Date
Martin v. Löwis b74d084da8 Conditionalize sys/time.h inclusion. 2008-03-24 13:54:23 +00:00
Martin v. Löwis aef18b1c67 Patch #2240: Implement signal.setitimer and signal.getitimer. 2008-03-24 13:31:16 +00:00
Facundo Batista 7e251e83d5 Issue 1089358. Adds the siginterrupt() function, that is just a
wrapper around the system call with the same name.  Also added
test cases, doc changes and NEWS entry. Thanks Jason and Ralf
Schmitt.
2008-02-23 15:07:35 +00:00
Guido van Rossum 02de8979cc Patch #1583 by Adam Olsen.
This adds signal.set_wakeup_fd(fd) which sets a file descriptor to
which a zero byte will be written whenever a C exception handler runs.

I added a simple C API as well, PySignal_SetWakeupFd(fd).
2007-12-19 19:41:06 +00:00
Guido van Rossum 137c49ce6a Patch #1643738 by Ulisses Furquim -- make the is_tripped variable
in signalmodule.c more robust.  Includes Martin von Loewis's suggestion
to set is_tripped after .tripped.
2007-12-10 23:00:12 +00:00
Neal Norwitz 1ac754fa10 Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
2006-01-19 06:09:39 +00:00
Guido van Rossum 8ee3e5aa93 - Changes donated by Elemental Security to make it work on AIX 5.3
with IBM's 64-bit compiler (SF patch #1284289).  This also closes SF
  bug #105470: test_pwd fails on 64bit system (Opteron).
2005-09-14 18:09:42 +00:00
Anthony Baxter 9ceaa72ebe Patch #975056 - fixes for restartable signals on *BSD. In addition,
a few remaining calls to signal() were converted to PyOS_setsig().
2004-10-13 14:48:50 +00:00
Michael W. Hudson 24ec21174c silly typo 2004-06-17 15:55:53 +00:00
Anthony Baxter f37f37dec0 Patch [ 776725 ] add SIGRTMIN, SIGRTMAX to signalmodule.c
Trivial patch, and the alternative is to guess at the right values
based on platform...
2003-07-31 10:35:29 +00:00
Michael W. Hudson 43ed43bfc1 Take out my (long since disabled) POSIX signal mask handling code.
I'm not going to have the time or energy to get this working x-platform
-- anyone who does is welcome to the code!
2003-03-13 13:56:53 +00:00
Guido van Rossum 6297a7a9fb - PyEval_GetFrame() is now declared to return a PyFrameObject *
instead of a plain PyObject *.  (SF patch #686601 by Ben Laurie.)
2003-02-19 15:53:17 +00:00
Mark Hammond fe51c6d66e Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
for Py_Main().

Thanks to Kalle Svensson and Skip Montanaro for the patches.
2002-08-02 02:27:13 +00:00
Martin v. Löwis 6238d2b024 Patch #569753: Remove support for WIN16.
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
2002-06-30 15:26:10 +00:00
Neal Norwitz 4178515035 SF # 533070 Silence AIX C Compiler Warnings
Warning caused by using &func.  & is not necessary.
2002-06-13 21:42:51 +00:00
Martin v. Löwis 14f8b4cfcb Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
Michael W. Hudson 34f20eac98 This is patch
[ 559250 ] more POSIX signal stuff

Adds support (and docs and tests and autoconfery) for posix signal
mask handling -- sigpending, sigprocmask and sigsuspend.
2002-05-27 15:08:24 +00:00
Neal Norwitz ba3a16c6c3 Remove METH_OLDARGS:
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple
  Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Please review.  All tests pass, but some modules don't have tests.
I spot checked various functions to try to make sure nothing broke.
2002-03-31 15:27:00 +00:00
Neil Schemenauer 78662cf9a1 Add type cast. 2002-03-28 21:04:14 +00:00
Neal Norwitz 3a6f97850b Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS. 2002-03-25 20:46:46 +00:00
Andrew MacIntyre 7bf6833e17 OS/2 EMX port changes (Modules part of patch #450267):
Modules/
    _hotshot.c
    dbmmodule.c
    fcntlmodule.c
    main.c
    pwdmodule.c
    readline.c
    selectmodule.c
    signalmodule.c
    termios.c
    timemodule.c
    unicodedata.c
2002-03-03 02:59:16 +00:00
Martin v. Löwis 175af2574f Export SIGINFO. Fixes #502077. 2002-01-12 11:43:25 +00:00
Martin v. Löwis cdc4451222 Include <unistd.h> in Python.h. Fixes #500924. 2002-01-12 11:05:12 +00:00
Tim Peters 1ce3cf7749 SF patch [#466877] SIGBREAK is missing from signal module.
Patch from Steve Scott to add SIGBREAK support (unique to Windows).
2001-10-01 17:58:40 +00:00
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