This function returns EINPROGRESS if the request has not been
completed yet. It returns ECANCELED if the request was cancelled.
It returns 0 if the request completed successfully.
Otherwise an error value is returned, the same value that would have
been stored in the
errno variable in case of a synchronous
read,
write,
fsync, or
fdatasync request.
On error, the error value is returned.