]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-127586: multiprocessing.Pool does not properly restore blocked signals...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 29 Dec 2024 19:02:53 +0000 (20:02 +0100)
committerGitHub <noreply@github.com>
Sun, 29 Dec 2024 19:02:53 +0000 (11:02 -0800)
commit16fde763e59b8ca3977af99d6b69c7f1b5b67d7a
tree8dbbab7c6a924583645cd21c35ede97734c56c60
parentaea2e03b276c79f8934d17056a68899e69763fae
[3.13] gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011) (#128298)

gh-127586: multiprocessing.Pool does not properly restore blocked signals (try 2) (GH-128011)

Correct pthread_sigmask in resource_tracker to restore old signals

Using SIG_UNBLOCK to remove blocked "ignored signals" may accidentally
cause side effects if the calling parent already had said signals
blocked to begin with and did not intend to unblock them when
creating a pool. Use SIG_SETMASK instead with the previous mask of
blocked signals to restore the original blocked set.
(cherry picked from commit aeb9b65aa26444529e4adc7d6e5b0d3dd9889ec2)

Co-authored-by: Stephen Hansen <stephen.paul.hansen@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/multiprocessing/resource_tracker.py
Lib/test/_test_multiprocessing.py
Misc/NEWS.d/next/Library/2024-12-03-20-28-08.gh-issue-127586.zgotYF.rst [new file with mode: 0644]