Filipe Laíns <filipe.la...@gmail.com> added the comment: This is a simple time-of-check - time-of-action issue, which is why I suggested that it shouldn't be fixed. I was not aware send_signal did have this check, which tells us it is supposed to be suported(?). Anyway, to fix it we need to catch the exception and check for errno == 3 so that we can ignore it.
Optimally we would want to have an atomic operation here, but no such thing exists. There is still the very faint possibility that after your process exits a new process will take its id and we kill it instead. We should keep the returncode check and just ignore the exception when errno == 3. This is the best option. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40550> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com