3 ms·
The first half of the article basically complains about the write()'s syscall possibility to fail. Errors can occur and you need to handle them, there is no wa
by clktmr 6y ago
The first half of the article basically complains about the write()'s syscall possibility to fail. Errors can occur and you need to handle them, there is no way around it. Given that "Everything is a File", the OS shouldn't try to make any guarantees around that. There are cases where you want to handle an early return by write().
This is a syscall after all. First priority is to provide a very general interface and remain compatible, not developer ergonomics.