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 gregory.p.smith
Recipients akira, gregory.p.smith, larry, sstewartgallus
Date 2014-06-01.07:18:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401607099.33.0.993676177896.issue21618@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a patch with a unittest that reproduces the problem with fixes to stop using any end_fds.  The max fd is only ever used in the absolute fallback situation where no way to get a list of open fd's is available. In that case it is obtained from sysconf() at the time it is needed rather than module load time as sysconf() is async-signal-safe.

I'm not worried about calling close() an additional time on EINTR in the single threaded child process prior to exec().  The most that will happen is one extra call with a different error if the fd is in a bad state from the previous one.  That is better than any chance of one being left open.
History
Date User Action Args
2014-06-01 07:18:19gregory.p.smithsetrecipients: + gregory.p.smith, larry, akira, sstewartgallus
2014-06-01 07:18:19gregory.p.smithsetmessageid: <1401607099.33.0.993676177896.issue21618@psf.upfronthosting.co.za>
2014-06-01 07:18:19gregory.p.smithlinkissue21618 messages
2014-06-01 07:18:18gregory.p.smithcreate