Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The right assumption is that every syscall can return any defined errno value. In practice this means that you should handle the cases that you have to handle (-EINTR and for write(2) incomplete writes, which are typical reason for “fatal error: Success”), that you can somehow handle (things like retries for -ENOSPC) and log strerror(3) result for anything that you don't expect (whether you shoult then abort(), exit() or continue depends on how critical the failed syscall was).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: