On Thu, 5 Sep 2002, Oren Tirosh wrote: >So what are the three problems of signals? >Two - Interruptible system calls. If all Python I/O calls are wrapped >inside restarting wrappers this should be solved. If the system's libc >wraps them it can be disabled by SA_RESTART (posix) or siginterrupt (BSD). >On some systems read and recv return a short buffer instead of EINTR. This >can be safely ignored because it only happens for pipes and sockets where >this is a valid result. AFAIR it's guaranteed not to happen on regular >files so we won't be tricked into believing they reached EOF. Are there >any systems where system calls are interruptible but not restartable >in any way without data loss? I don't see any guarantee against short reads in my documentation (Linux, HP-UX); indeed both state explicitly that only a 0 return from read() indicates EOF. /Paul
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4