mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-20 23:36:34 +00:00
Return when sigset size error for rt_sigsuspend, rt_sigprocmask and rt_sigaction
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ab8b6afee5
commit
44760eb5fa
@ -22,6 +22,10 @@ pub fn sys_rt_sigaction(
|
||||
sigset_size
|
||||
);
|
||||
|
||||
if sigset_size != 8 {
|
||||
return_errno_with_message!(Errno::EINVAL, "sigset size is not equal to 8");
|
||||
}
|
||||
|
||||
let mut sig_dispositions = ctx.process.sig_dispositions().lock();
|
||||
|
||||
let old_action = if sig_action_addr != 0 {
|
||||
|
@ -24,7 +24,7 @@ pub fn sys_rt_sigprocmask(
|
||||
mask_op, set_ptr, oldset_ptr, sigset_size
|
||||
);
|
||||
if sigset_size != 8 {
|
||||
error!("sigset size is not equal to 8");
|
||||
return_errno_with_message!(Errno::EINVAL, "sigset size is not equal to 8");
|
||||
}
|
||||
do_rt_sigprocmask(mask_op, set_ptr, oldset_ptr, ctx)?;
|
||||
Ok(SyscallReturn::Return(0))
|
||||
|
@ -22,7 +22,6 @@ pub fn sys_rt_sigsuspend(
|
||||
sigmask_addr, sigmask_size
|
||||
);
|
||||
|
||||
debug_assert!(sigmask_size == core::mem::size_of::<SigMask>());
|
||||
if sigmask_size != core::mem::size_of::<SigMask>() {
|
||||
return_errno_with_message!(Errno::EINVAL, "invalid sigmask size");
|
||||
}
|
||||
|
Reference in New Issue
Block a user