rustjail: delete function signal in BaseContainer
Function signal in BaseContainer is not used anymore.
Fixes:
@@ -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());
