Bartosz Kwitniewski added the comment:
It works as intended - pool of 5 processes is being reused with new data:
- First, 5 processes are created as root,
- in first run of check_permission they drop their privileges to user,
- when they finish processing check_permission function, they are not killed, but provided with new path for processing, therefore they retain their lower privileges,
- when maxtasksperchild=1 is used, processes are killed after single run of check_permission and recreated with root permissions.
----------
nosy: +zerg
_______________________________________
Python tracker
https://bugs.python.org/issue38963
_______________________________________