[PATCH V2] util: improve iterfile so it chooses code path wisely

Jun Wu quark at fb.com
Wed Nov 16 11:16:33 EST 2016


Excerpts from Yuya Nishihara's message of 2016-11-17 00:25:39 +0900:
> Perhaps os.read() is a thin wrapper over read(2), which says "EINTR The call
> was interrupted by a signal before any data was read." In other words, read()
> never raises EINTR if it has some data to return.

Nice property! It's a life saver.
I'm now a stdio hater like the CPython dev haypo.

Related read:
https://haypo-notes.readthedocs.io/python.html#bugs-in-the-c-stdio-used-by-the-python-i-o


More information about the Mercurial-devel mailing list