Victor Stinner
20cc695286
gh-64783: Fix signal.NSIG value on FreeBSD ( #91929 )
...
Fix signal.NSIG value on FreeBSD to accept signal numbers greater
than 32, like signal.SIGRTMIN and signal.SIGRTMAX.
* Add Py_NSIG constant.
* Add pycore_signal.h internal header file.
* _Py_Sigset_Converter() now includes the range of valid signals in
the error message.
2022-04-26 00:13:31 +02:00
AJ Jordan
326ae71f1d
Fix awkward sentence in signal docs ( #91508 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-19 18:20:25 -07:00
benfogle
d0906c90fc
bpo-42340: Document issues around KeyboardInterrupt (GH-23255)
...
Update documentation to note that in some circumstances,
KeyboardInterrupt may cause code to enter an inconsistent state. Also
document sample workaround to avoid KeyboardInterrupt, if needed.
2022-03-29 14:21:36 -07:00
Gareth Rees
a62be77266
bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined (GH-29266)
2021-12-13 18:22:43 +01:00
Bibo-Joshi
9be930f9b1
bpo-28206: Document signals Handlers, Sigmasks and Signals enums (GH-28628)
...
Co-authored-by: desbma <desbma@users.noreply.github.com>
2021-10-04 13:09:40 +02:00
Zhang Maiyun
4c24b08cd3
Fix wrong availability for signal.SIGCHLD ( #23285 )
...
I believe this is a mistake. SIGCHLD is only available on Unix systems, not Windows.
2020-11-20 20:16:46 +02:00
Tim Burke
47f6ec4c09
Doc: Fix broken manpage link (GH-21937)
...
sigprocmask is in section 2, not 3.
2020-09-15 20:26:06 -03:00
Victor Stinner
400e1dbcad
Document most common signals (GH-19245)
...
Document individual signals (only the most common signals):
description, default action, availability.
2020-03-31 19:13:10 +02:00
Victor Stinner
d2a8e5b42c
bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter (GH-19087)
...
COMPUTE_EVAL_BREAKER() now also checks if the Python thread state
belongs to the main interpreter. Don't break the evaluation loop if
there are pending signals but the Python thread state it belongs to a
subinterpeter.
* Add _Py_IsMainThread() function.
* Add _Py_ThreadCanHandleSignals() function.
2020-03-20 13:38:58 +01:00
Saiyang Gou
7514f4f625
bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, `resource`, `shutil`, `signal`, `syslog` (GH-18407)
2020-02-13 07:47:42 +00:00
Benjamin Peterson
7483451577
closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)
...
This exposes a Linux-specific syscall for sending a signal to a process
identified by a file descriptor rather than a pid.
For simplicity, we don't support the siginfo_t parameter to the syscall. This
parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which
Python also doesn't support.
2019-11-19 20:39:14 -08:00
Géry Ogam
cfebfef2de
Improve signal documentation (GH-14274)
...
* add a missing ``.. availability::`` reST explicit markup;
* more consistent "see man page" sentences.
2019-08-06 14:12:22 -07:00
Julien Palard
e85ef7a7ea
bpo-28795: Signal documentation: Fix misleading statement. (GH-13121)
2019-05-07 17:27:48 +02:00
Vladimir Matveev
c24c6c2c93
bpo-35568: add 'raise_signal' function (GH-11335)
...
As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function.
https://bugs.python.org/issue35568
2019-01-08 01:58:25 -08:00
Cheryl Sabella
2d6097d027
bpo-11233: Create availability directive for documentation (GH-9692)
...
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
2018-10-12 16:55:20 +02:00
Alfred Perlstein
a2510732da
Warn not to set SIGPIPE to SIG_DFL ( #6773 )
2018-08-17 14:48:05 +01:00
Antoine Pitrou
9d3627e311
bpo-33332: Add signal.valid_signals() (GH-6581)
2018-05-04 13:00:50 +02:00
Antoine Pietri
5d2a27de62
signal: add strsignal() ( #6017 )
...
Co-authored-by: Vajrasky Kok <sky.kok@speaklikeaking.com>
2018-03-12 14:42:34 +01:00
Nathaniel J. Smith
902ab80b59
bpo-30050: Allow disabling full buffer warnings in signal.set_wakeup_fd ( #4792 )
2017-12-17 23:10:18 -05:00
Victor Stinner
ef611c96ea
bpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)
...
The _PyTime API handles detects overflow and is well tested.
Document that the signal will only be sent once if internal is equal
to zero.
2017-10-13 13:49:43 -07:00
Antoine Pitrou
d79c1d4a94
Mention how to disable signal fd wakeup ( #2140 )
2017-06-13 10:14:09 +02:00
Berker Peksag
219a012156
Issue #28738 : Document SIGBREAK as an acceptable value on Windows
...
Patch by Wojtek Ruszczewski.
2016-11-25 19:46:57 +03:00
Terry Jan Reedy
fa089b9b0b
Issue #22558 : Add remaining doc links to source code for Python-coded modules.
...
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Berker Peksag
77e543c6cd
Issue #21382 : Clarify signal.signal() documentation on Windows
...
All signal.SIG* constants may not be defined on Windows so a call like
signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
will raise an AttributeError.
2016-04-24 02:59:16 +03:00
Martin Panter
199e3f8b96
Issue #14456 : Remove contradiction about blocking signals from bad merge
2016-04-11 02:44:34 +00:00
Martin Panter
c04fb56e36
Issue #26304 : Change "allows to <verb>" to "allows <verb>ing" or similar
...
The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
2016-02-10 05:44:01 +00:00
Serhiy Storchaka
153627c111
Marked keystrokes with the :kbd: role.
...
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:46:20 +03:00
Serhiy Storchaka
0424eaf753
Marked keystrokes with the :kbd: role.
...
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:45:25 +03:00
Tal Einat
c7027b7904
Issue #20182 : converted the signal module to use Argument Clinic
2015-05-16 14:14:49 +03:00
Victor Stinner
eb011cb8df
What's New in Python 3.5, PEP 475: mention modified signal functions
2015-03-31 12:19:15 +02:00
Victor Stinner
a453cd8d85
Issue #23715 : signal.sigwaitinfo() and signal.sigtimedwait() are now retried
...
when interrupted by a signal not in the *sigset* parameter, if the signal
handler does not raise an exception. signal.sigtimedwait() recomputes the
timeout with a monotonic clock when it is retried.
Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't
raise InterruptedError anymore if it is interrupted by a signal not in its
sigset parameter.
2015-03-20 12:54:28 +01:00
Victor Stinner
115171086a
Issue #22018 : On Windows, signal.set_wakeup_fd() now also supports sockets.
...
A side effect is that Python depends to the WinSock library.
2014-07-29 23:31:34 +02:00
Victor Stinner
1d8948e023
Backout 42ced0d023cd: oops, i didn't want to push this changeset :-/
2014-07-24 22:51:05 +02:00
Victor Stinner
d18ccd19f0
tets
2014-07-24 21:58:53 +02:00
Giampaolo Rodola'
e09fb7198a
fix #21076 : turn signal module constants into enums
2014-04-04 15:34:17 +02:00
Georg Brandl
c377fe2b96
Closes #1215 : document better why it is not a good idea to catch e.g. SIGSEGV and refer to faulthandler.
...
Patch by Martin Pool.
2013-10-06 21:22:42 +02:00
Antoine Pitrou
8bbe9b4390
Fix formatting
2012-03-31 21:09:53 +02:00
Antoine Pitrou
682d443e01
Issue #14456 : improve documentation of the signal module w.r.t. threads.
2012-03-31 21:09:00 +02:00
Antoine Pitrou
6afd11c762
Issue #14456 : improve documentation of the signal module w.r.t. threads.
2012-03-31 20:56:21 +02:00
Victor Stinner
643cd68ea4
Issue #13964 : signal.sigtimedwait() timeout is now a float instead of a tuple
...
Add a private API to convert an int or float to a C timespec structure.
2012-03-02 22:54:03 +01:00
Antoine Pitrou
767c0a82ad
Mention InterruptedError in the doc for new function signal.sigwaitinfo
2011-10-23 23:52:23 +02:00
Antoine Pitrou
4272d6a315
Fix some mentions of IOError
2011-10-12 19:10:10 +02:00
Ross Lagerwall
bc808224b6
Issue #12303 : Add sigwaitinfo() and sigtimedwait() to the signal module.
2011-06-25 12:13:40 +02:00
Victor Stinner
2a12974bca
Close #12028 : Make threading._get_ident() public, rename it to
...
threading.get_ident() and document it. This function was used by
_thread.get_ident().
2011-05-30 23:02:52 +02:00
Victor Stinner
d49b1f14de
Issue #8407 : The signal handler writes the signal number as a single byte
...
instead of a nul byte into the wakeup file descriptor. So it is possible to
wait more than one signal and know which signals were raised.
2011-05-08 02:03:15 +02:00
Victor Stinner
b3e7219abf
Issue #8407 : Add pthread_kill(), sigpending() and sigwait() functions to the
...
signal module.
2011-05-08 01:46:11 +02:00
Victor Stinner
35b300c5fd
Issue #8407 : signal.pthread_sigmask() returns a set instead of a list
...
Update the doc. Refactor also related tests.
2011-05-04 13:20:35 +02:00
Victor Stinner
a929335961
Issue #8407 , issue #11859 : Add signal.pthread_sigmask() function to fetch
...
and/or change the signal mask of the calling thread.
Fix also tests of test_io using threads and an alarm: use pthread_sigmask() to
ensure that the SIGALRM signal is received by the main thread.
Original patch written by Jean-Paul Calderone.
2011-04-30 15:21:58 +02:00
Georg Brandl
60203b41b0
Migrate to Sphinx 1.0 C language constructs.
2010-10-06 10:11:56 +00:00
Brian Curtin
ef9efbd69c
Fix #9324 : Add parameter validation to signal.signal on Windows in order
...
to prevent crashes.
2010-08-06 19:27:32 +00:00