| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
(GH-7307)
(cherry picked from commit e905c84494526363086f66a979e317e155bf9536)
Co-authored-by: pkerling <pkerling@casix.org>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-6582)
Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some
reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom
is commonly used to select all signals for blocking with `pthread_sigmask`.
So we ignore the sigaddset() return value until we expose sigfillset()
to provide a better idiom.
(cherry picked from commit 25038ecfb665bef641abf8cb61afff7505b0e008)
|
| |
|
|
| |
Bug report and patch by Jeroen Demeyer.
(cherry picked from commit f6f90ff079a22b79a58d47b6117cc8a8c7d366f3)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-2417) (#3007)
* Improve signal delivery
Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.
* Remove unused function
* Improve comments
* Use _Py_atomic API for concurrency-sensitive signal state
* Add blurb
(cherry picked from commit 2c8a5e4c968217f9672340e520942c4ed788d8de)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [3.6] bpo-30703: Improve signal delivery (GH-2415)
* Improve signal delivery
Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.
* Remove unused function
* Improve comments
* Add stress test
* Adapt for --without-threads
* Add second stress test
* Add NEWS blurb
* Address comments @haypo.
(cherry picked from commit c08177a1ccad2ed0d50898c2731b518c631aed14)
* bpo-30796: Fix failures in signal delivery stress test (#2488)
* bpo-30796: Fix failures in signal delivery stress test
setitimer() can have a poor minimum resolution on some machines,
this would make the test reach its deadline (and a stray signal
could then kill a subsequent test).
* Make sure to clear the itimer after the test
|
| |
|
|
|
|
|
|
| |
(GH-2493) (#2497)
* bpo-30807: signal.setitimer() may disable the timer by mistake
* Add NEWS blurb
(cherry picked from commit 729780a810bbcb12b245a1b652302a601fc9f6fd)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, it was possible to get the following sequence of
events (especially on Windows, where the C-level signal handler for
SIGINT is run in a separate thread):
- SIGINT arrives
- trip_signal is called
- trip_signal writes to the wakeup fd
- the main thread wakes up from select()-or-equivalent
- the main thread checks for pending signals, but doesn't see any
- the main thread drains the wakeup fd
- the main thread goes back to sleep
- trip_signal sets is_tripped=1 and calls Py_AddPendingCall to notify
the main thread the it should run the Python-level signal handler
- the main thread doesn't notice because it's asleep
This has been causing repeated failures in the Trio test suite:
https://github.com/python-trio/trio/issues/119
(cherry picked from commit 4ae01496971624c75080431806ed1c08e00f22c7)
|
| |\ |
|
| | |
| |
| |
| |
| | |
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
|
| | |
| |
| |
| |
| |
| |
| | |
The signal module was using old-style module initialization with
potential NULL dereferencing.
CID 1295026
|
| | | |
|
| |/ |
|
| |
|
|
| |
generated by Argument Clinic. Patch by Petr Viktorin.
|
| |
|
|
| |
in places where Py_DECREF was used.
|
| | |
|
| |
|
|
| |
macro Py_SETREF.
|
| | |
|
| | |
|
| |
|
|
| |
signalmodule.c
|
| |
|
|
|
|
|
|
|
| |
Retry:
* signal.sigtimedwait()
* threading.Lock.acquire()
* threading.RLock.acquire()
* time.sleep()
|
| |
|
|
| |
Add _Py_fstat_noraise() function when a Python exception is not welcome.
|
| |
|
|
|
| |
All these functions only accept positive timeouts, so this change has no effect
in practice.
|
| |
|
|
|
| |
* Add _PyTime_AsTimespec()
* Add unit tests for _PyTime_AsTimespec()
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
the errno shim.
|
| |
|
|
|
|
| |
Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
|
| |
|
|
| |
Detect integer overflow on the file descriptor of the socket on 64-bit Python.
|
| |
|
|
|
|
|
| |
- interpreter startup and shutdown code moved to a new
pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
global flags
|
| |
|
|
| |
descriptor is in blocking mode.
|
| |
|
|
| |
A side effect is that Python depends to the WinSock library.
|
| | |
|
| | |
|
| |
|
|
| |
ValueError on fstat() failure.
|
| |\ |
|
| |/ |
|
| |
|
|
|
|
| |
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
registered with ``signal.set_wakeup_fd()``, report an exception instead of ignoring the error.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
|
| |\ \
| |/
| |
| | |
interpreter shutdown.
|
| | |
| |
| |
| | |
interpreter shutdown.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
timespec``'s "tv_nsec" member is not a C long.
|
| | |
| |
| |
| | |
Patch by Roumen Petrov.
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Thanks to Thomas Heller for the bug report.
|