diff --git a/wasm/src/main.rs b/wasm/src/main.rs index 1a2ecb4a..c12ac6e8 100644 --- a/wasm/src/main.rs +++ b/wasm/src/main.rs @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +use std::process::exit; + use containerd_shim::asynchronous::monitor::monitor_notify_by_pid; use futures::StreamExt; use log::{debug, error, warn}; @@ -57,7 +59,11 @@ async fn handle_signals(signals: Signals) { let mut signals = signals.fuse(); while let Some(sig) = signals.next().await { match sig { - libc::SIGTERM | libc::SIGINT => { + libc::SIGTERM => { + debug!("received {}", sig); + exit(sig); + } + libc::SIGINT => { debug!("received {}", sig); } libc::SIGCHLD => loop {