gh-112800: Ignore PermissionError on SubprocessTransport.close()#112803
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
3eae8fb to
9f1b302
Compare
In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError. Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
9f1b302 to
f79b680
Compare
gvanrossum
left a comment
There was a problem hiding this comment.
Hey! Sorry for the delay. This makes sense. I was going to ask for a test, but of course that's pointless since we're not going to be writing tests that depend on setuid programs. The fix is really minimal, so I'm going to merge this.
Do you have an opinion on whether this is important enough to backport the fix to 3.12 or 3.11?
…) in asyncio (python#112803) In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError. Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
…) in asyncio (python#112803) In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError. Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
…) in asyncio (python#112803) In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError. Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
…) in asyncio (python#112803) In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError. Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
In case the spawned process is setuid, we may not be able to send signals to it, in which case our .kill() call will raise PermissionError.
Ignore that in order to avoid .close() raising an exception. Hopefully the process will exit as a result of receiving EOF on its stdin.
Closes #112800