https://unix.stackexchange.com/questions/509375/what-is-interrupted-system-call

    1. loop {
    2. let ret = uio::pwrite(self.fd, buf, offset as i64).map_err(|_| last_error!());
    3. match ret {
    4. Ok(nr_write) => {
    5. trace!("write {}(offset={}) bytes to cache file", nr_write, offset);
    6. break;
    7. }
    8. Err(err) => {
    9. // Retry if the IO is interrupted by signal.
    10. if err.kind() != ErrorKind::Interrupted {
    11. return Err(err);
    12. }
    13. }
    14. }
    15. }

    当read write返回interrupted异常后,应该重试