This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author liuxu1005
Recipients liuxu1005
Date 2020-01-07.01:35:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578360908.03.0.624419556785.issue39241@roundup.psfhosted.org>
In-reply-to
Content
I have a piece code hangs on os.read(errpipe_read, 50000)
So I compared the python3.6 with python2.7 on _execute_child, I saw:

for python2.7 we create the errpipe_read/write with pipe_cloexec()

1213             # For transferring possible exec failure from child to parent
1214             # The first char specifies the exception type: 0 means
1215             # OSError, 1 means some other error.
1216             errpipe_read, errpipe_write = self.pipe_cloexec()


while for python3.6 we create the errpipe_read/write with pipe()

1251             # For transferring possible exec failure from child to parent.
1252             # Data format: "exception name:hex errno:description"
1253             # Pickle is not used; it is complex and involves memory allocation.
1254             errpipe_read, errpipe_write = os.pipe()

Does that mean python3.6 doesn't set the the flag FD_CLOEXEC on the pipe ?
History
Date User Action Args
2020-01-07 01:35:08liuxu1005setrecipients: + liuxu1005
2020-01-07 01:35:08liuxu1005setmessageid: <1578360908.03.0.624419556785.issue39241@roundup.psfhosted.org>
2020-01-07 01:35:07liuxu1005linkissue39241 messages
2020-01-07 01:35:07liuxu1005create