1 Feb
2013
1 Feb
'13
10:16 p.m.
Amaury Forgeot d'Arc wrote:
One reasonable heuristic is to check the man page: if the syscall can return EINTR, then the GIL should be released.
Hmmm, curious. According to the MacOSX man pages, both dup() and dup2() can return EINTR, but pipe() and socketpair() can't. I'm particularly surprised about dup(), as that's the one I would have thought couldn't possibly block -- it only needs to manipulate in-memory data structures. For Linux, the only one returning EINTR is dup2(). FreeBSD has none of them returning EINTR. So it looks like there's a fair bit of variation between unices here. -- Greg