I\'ve found this piece of code used several times (also a similar one where it\'s used open() instead of write()).
int c = write(fd
the answers here are really good and i want to add some internal details :
System calls that are interrupted by signals can either abort and return
EINTRor automatically restart themselves if and only ifSA_RESTARTis specified insigaction(2)
and the one responsible for this task is the restart_block which used to track information and arguments for restarting system calls