mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
rustjail: delete function signal in BaseContainer
Function signal in BaseContainer is not used anymore. Fixes: #3835 Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
parent
d647b28bb8
commit
b257e0e5ab
@ -215,7 +215,6 @@ pub trait BaseContainer {
|
||||
async fn start(&mut self, p: Process) -> Result<()>;
|
||||
async fn run(&mut self, p: Process) -> Result<()>;
|
||||
async fn destroy(&mut self) -> Result<()>;
|
||||
fn signal(&self, sig: Signal, all: bool) -> Result<()>;
|
||||
fn exec(&mut self) -> Result<()>;
|
||||
}
|
||||
|
||||
@ -1057,18 +1056,6 @@ impl BaseContainer for LinuxContainer {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn signal(&self, sig: Signal, all: bool) -> Result<()> {
|
||||
if all {
|
||||
for pid in self.processes.keys() {
|
||||
signal::kill(Pid::from_raw(*pid), Some(sig))?;
|
||||
}
|
||||
}
|
||||
|
||||
signal::kill(Pid::from_raw(self.init_process_pid), Some(sig))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn exec(&mut self) -> Result<()> {
|
||||
let fifo = format!("{}/{}", &self.root, EXEC_FIFO_FILENAME);
|
||||
let fd = fcntl::open(fifo.as_str(), OFlag::O_WRONLY, Mode::from_bits_truncate(0))?;
|
||||
@ -2049,14 +2036,6 @@ mod tests {
|
||||
assert!(ret.is_ok(), "Expecting Ok, Got {:?}", ret);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_linuxcontainer_signal() {
|
||||
let ret = new_linux_container_and_then(|c: LinuxContainer| {
|
||||
c.signal(nix::sys::signal::SIGCONT, true)
|
||||
});
|
||||
assert!(ret.is_ok(), "Expecting Ok, Got {:?}", ret);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_linuxcontainer_exec() {
|
||||
let ret = new_linux_container_and_then(|mut c: LinuxContainer| c.exec());
|
||||
|
Loading…
Reference in New Issue
Block a user