iotests: Explicitly bequeath FDs in Python
Python 3.4 introduced the inheritable attribute for FDs. At the same time, it changed the default so that all FDs are not inheritable by default, that only inheritable FDs are inherited to subprocesses, and only if close_fds is explicitly set to False. Adhere to this by setting close_fds to False when working with subprocesses that may want to inherit FDs, and by trying to set_inheritable() on FDs that we do want to bequeath to them. Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NCleber Rosa <crosa@redhat.com> Message-Id: <20181022135307.14398-7-mreitz@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Showing
想要评论请 注册 或 登录