mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-27 20:18:57 +00:00
container: fix the issue of send signal to process
It's better to check the container's status before try to send signal to it. Since there's no need to send signal to it when the container's stopped. Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
This commit is contained in:
parent
e156516bde
commit
c51ba73199
@ -275,6 +275,10 @@ impl ContainerInner {
|
|||||||
signal: u32,
|
signal: u32,
|
||||||
all: bool,
|
all: bool,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
if self.check_state(vec![ProcessStatus::Stopped]).await.is_ok() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let mut process_id: agent::ContainerProcessID = process.clone().into();
|
let mut process_id: agent::ContainerProcessID = process.clone().into();
|
||||||
if all {
|
if all {
|
||||||
// force signal init process
|
// force signal init process
|
||||||
|
Loading…
Reference in New Issue
Block a user