Charles-Francois Natali <neolo...@free.fr> added the comment: _remaining_time doesn't check that endtime > current time and can return a negative number, which would trigger an EINVAL when passed to select (select_select doesn't seem to check for negative double). Note that a check is performed through _check_timeout but after having called select, so there are at least two possible ways to get this error: The process blocks a little before calling select for the first time. This can at least happen here: if self.stdin and not self._communication_started: # Flush stdio buffer. This might block, if the user has # been writing to .stdin in an uncontrolled fashion. self.stdin.flush() if not input: self.stdin.close()
There's also a short race window if the endtime deadline expires between the call to _check_timeout and remaining_time. ---------- nosy: +neologix _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com