Victor Stinner
e72fe3995b
Issue #23836 : Use _Py_write_noraise() to retry on EINTR in trip_signal() of
signalmodule.c
11 years ago
Victor Stinner
6aa446cf03
PEP 475: on EINTR, retry the function even if the timeout is equals to zero
Retry:
* signal.sigtimedwait()
* threading.Lock.acquire()
* threading.RLock.acquire()
* time.sleep()
11 years ago
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
11 years ago
Victor Stinner
869e1778c0
Issue #22117 : Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING
All these functions only accept positive timeouts, so this change has no effect
in practice.
11 years ago
Victor Stinner
34dc0f46ae
Issue #22117 : The signal modules uses the new _PyTime_t API
* Add _PyTime_AsTimespec()
* Add unit tests for _PyTime_AsTimespec()
11 years ago
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.
11 years ago
Steve Dower
8acde7dcce
Issue #23524 : Change back to using Windows errors for _Py_fstat instead of the errno shim.
11 years ago
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
11 years ago
Victor Stinner
cf40a9e640
Issue #23450 : Fix signal.set_wakeup_fd() on Windows
Detect integer overflow on the file descriptor of the socket on 64-bit Python.
11 years ago
Nick Coghlan
d600951748
Issue #22869 : Split pythonrun into two modules
- interpreter startup and shutdown code moved to a new
pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
global flags
11 years ago
Victor Stinner
3822760f2d
Issue #22042 : signal.set_wakeup_fd(fd) now raises an exception if the file
descriptor is in blocking mode.
12 years ago
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.
12 years ago
Victor Stinner
1d8948e023
Backout 42ced0d023cd: oops, i didn't want to push this changeset :-/
12 years ago
Victor Stinner
d18ccd19f0
tets
12 years ago
Victor Stinner
0bffc94d57
Issue #22018 : signal.set_wakeup_fd() now raises an OSError instead of a
ValueError on fstat() failure.
12 years ago
Giampaolo Rodola'
e09fb7198a
fix #21076 : turn signal module constants into enums
12 years ago
Victor Stinner
3c1b379ebd
Issue #20320 : select.select() and select.kqueue.control() now round the timeout
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
12 years ago
Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
12 years ago
Christian Heimes
44ed3de6f4
Issue #18774 : Remove last bits of GNU PTH thread code, patch by Vajrasky Kok.
13 years ago
Antoine Pitrou
6f6ec37838
Issue #16105 : When a signal handler fails to write to the file descriptor registered with ``signal.set_wakeup_fd()``, report an exception instead of ignoring the error.
13 years ago
Victor Stinner
1c8f059019
Issue #18520 : Add a new PyStructSequence_InitType2() function, same than
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
13 years ago
Antoine Pitrou
c8c952ce2a
Issue #14173 : Avoid crashing when reading a signal handler during interpreter shutdown.
13 years ago
Antoine Pitrou
cf8a1e51ec
- Issue #17782 : Fix undefined behaviour on platforms where ``struct timespec``'s "tv_nsec" member is not a C long.
13 years ago
Antoine Pitrou
7faf70512a
Issue #17591 : Use lowercase filenames when including Windows header files.
Patch by Roumen Petrov.
13 years ago
Serhiy Storchaka
7cf5599346
Issue #4591 : Uid and gid values larger than 2**31 are supported now.
13 years ago
Brett Cannon
0ecd30b4af
Issue #17098 : Make sure every module has __loader__ defined.
Thanks to Thomas Heller for the bug report.
13 years ago
Benjamin Peterson
c68a4a048c
check windows fd validity ( closes #16992 )
13 years ago
Benjamin Peterson
08e153ae37
check windows fd validity ( closes #16992 )
13 years ago
Gregory P. Smith
c1ce93a4ab
Fixes issue #9535 : Fix pending signals that have been received but not yet
handled by Python to not persist after os.fork() in the child process.
13 years ago
Gregory P. Smith
9463e3ac8b
Fixes issue #9535 : Fix pending signals that have been received but not
yet handled by Python to not persist after os.fork() in the child process.
13 years ago
Jesus Cea
14c81aba50
#16135 : Removal of OS/2 support (Modules/*)
13 years ago
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.
14 years ago
Charles-François Natali
6d0d24e359
Issue #13817 : After fork(), reinit the ad-hoc TLS implementation earlier to fix
a random deadlock when fork() is called in a multithreaded process in debug
mode, and make PyOS_AfterFork() more robust.
14 years ago
Charles-François Natali
e0e88b0483
Issue #13817 : After fork(), reinit the ad-hoc TLS implementation earlier to fix
a random deadlock when fork() is called in a multithreaded process in debug
mode, and make PyOS_AfterFork() more robust.
14 years ago
Antoine Pitrou
6dd381eb62
Issue #12328 : Under Windows, refactor handling of Ctrl-C events and
make _multiprocessing.win32.WaitForMultipleObjects interruptible when
the wait_flag parameter is false. Patch by sbt.
14 years ago
Charles-François Natali
1f3ff7bc3f
Issue #13156 : revert changeset f6feed6ec3f9, which was only relevant for native
TLS implementations, and fails with the ad-hoc TLS implementation when a thread
doesn't have an auto thread state (e.g. a thread created outside of Python
calling into a subinterpreter).
14 years ago
Ross Lagerwall
bc808224b6
Issue #12303 : Add sigwaitinfo() and sigtimedwait() to the signal module.
15 years ago
Victor Stinner
10c30d6764
Issue #8407 : signal.sigwait() releases the GIL
Initial patch by Charles-François Natali.
15 years ago
Victor Stinner
c13ef66649
Issue #8407 : Fix the signal handler of the signal module: if it is called
twice, it now writes the number of the second signal into the wakeup fd.
15 years ago
Victor Stinner
2ec6b176bd
Issue #12060 : Use sig_atomic_t type and volatile keyword in the signal module.
Patch written by Charles-François Natali.
15 years ago
Victor Stinner
388196ed72
Issue #12011 : signal.signal() and signal.siginterrupt() raise an OSError,
instead of a RuntimeError: OSError has an errno attribute.
15 years ago
Victor Stinner
86e104a6ab
Issue #8407 : Use an explicit cast for FreeBSD
pthread_t is a pointer, not an integer, on FreeBSD. It should fix the following
gcc warning:
passing argument 1 of ‘pthread_kill’ makes pointer from integer without a cast
15 years ago
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.
15 years ago
Victor Stinner
b3e7219abf
Issue #8407 : Add pthread_kill(), sigpending() and sigwait() functions to the
signal module.
15 years ago
Victor Stinner
35b300c5fd
Issue #8407 : signal.pthread_sigmask() returns a set instead of a list
Update the doc. Refactor also related tests.
15 years ago
Victor Stinner
d0e516db50
Issue #8407 : pthread_sigmask() checks immediatly if signal handlers have been
called. The test checks that SIG_UNBLOCK calls immediatly the signal handler of
the pending SIGUSR1. Improve also the tests using an exception (division by
zero) instead of a flag (a function attribute).
15 years ago
Victor Stinner
72c53b5dcc
cleanup signalmodule.c: use PyModule_AddIntMacro()
15 years ago
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.
15 years ago
Antoine Pitrou
0c759febb6
Issue #10517 : After fork(), reinitialize the TLS used by the PyGILState_*
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
15 years ago
Antoine Pitrou
4394e0db24
Issue #10517 : After fork(), reinitialize the TLS used by the PyGILState_*
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
15 years ago