From 34f220edcdee4982db1dffacd41920112fd9ad91 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 15 Sep 2021 15:43:40 +0100 Subject: [PATCH] main: Don't panic() if blocking signals fails This allows Cloud Hypervisor to be run under `perf` as some of the signals will already be blocked in the child process. Signed-off-by: Rob Bradford --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index afcaa1a49..72c598afd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -501,7 +501,9 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result, Error> { // installing handlers for, to make sure they only ever run on the // dedicated signal handling thread we'll start in a bit. for sig in vmm::vm::HANDLED_SIGNALS { - block_signal(sig).unwrap(); + if let Err(e) = block_signal(sig) { + eprintln!("Error blocking signals: {}", e); + } } event!("vmm", "starting");