use std::sync::{Arc, RwLock};
use nix::unistd::Pid;
use crate::{
confine::SydNotifResp, cookie::safe_kill, kernel::ptrace::handle_ptrace_sysenter,
ptrace::ptrace_syscall_info, sandbox::Sandbox, workers::WorkerCache,
};
pub(crate) fn sysevent_scmp(
pid: Pid,
info: ptrace_syscall_info,
cache: &Arc<WorkerCache>,
sandbox: &Arc<RwLock<Sandbox>>,
) -> Option<SydNotifResp> {
if info.seccomp().is_none() {
let _ = safe_kill(pid, libc::SIGKILL);
return None;
}
handle_ptrace_sysenter(pid, info, cache, sandbox)
}