mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 08:53:29 +00:00
Enable syscall restart
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ced0023d6b
commit
1b56a8b600
@ -39,7 +39,13 @@ pub fn sys_sendmsg(
|
||||
(io_vec_reader, MessageHeader::new(addr, control_message))
|
||||
};
|
||||
|
||||
let total_bytes = socket.sendmsg(&mut io_vec_reader, message_header, flags)?;
|
||||
let total_bytes = socket
|
||||
.sendmsg(&mut io_vec_reader, message_header, flags)
|
||||
.map_err(|err| match err.error() {
|
||||
// FIXME: `sendmsg` should not be restarted if a timeout has been set on the socket using `setsockopt`.
|
||||
Errno::EINTR => Error::new(Errno::ERESTARTSYS),
|
||||
_ => err,
|
||||
})?;
|
||||
|
||||
Ok(SyscallReturn::Return(total_bytes as _))
|
||||
}
|
||||
|
Reference in New Issue
Block a user