3 ms·
In this case that's before the next bytecode executes. The write syscall gets interrupted and returns EINTR, then cpython checks what signal was caught and exec
by skitter 3y ago
In this case that's before the next bytecode executes. The write syscall gets interrupted and returns EINTR, then cpython checks what signal was caught and executes the signal handler, before trying to do the remaining write:
https://github.com/python/cpython/blob/5f7aba938cf5007b6f95472a3a54732dd99a2df8/Modules/_io/bufferedio.c#L1809 https://github.com/python/cpython/blob/5f7aba938cf5007b6f954...
Here's even a test for it: https://github.com/python/cpython/blob/5f7aba938cf5007b6f95472a3a54732dd99a2df8/Lib/test/test_io.py#L4502 https://github.com/python/cpython/blob/5f7aba938cf5007b6f954...