previous | start | next

Read and Signals

If a signal is caught while a program is in the read function, on some systems read may return -1 and set errno.

On other systems, read may restart after the signal handler returns.

To handle signals in both cases, the full version of rio_readn checks for this and if

        errno == EINTR
     

the rio_readn function, arranges to keep reading until the requsted number of bytes have been read or EOF is reached.



previous | start | next