We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0522fd commit d07e42bCopy full SHA for d07e42b
machine.go
@@ -385,9 +385,10 @@ func (m *Machine) startVMM(ctx context.Context) error {
385
syscall.SIGABRT)
386
m.logger.Debugf("Setting up signal handler")
387
go func() {
388
- sig := <-sigchan
389
- m.logger.Printf("Caught signal %s", sig)
390
- m.cmd.Process.Signal(sig)
+ if sig, ok := <-sigchan; ok {
+ m.logger.Printf("Caught signal %s", sig)
+ m.cmd.Process.Signal(sig)
391
+ }
392
}()
393
394
// Wait for firecracker to initialize:
@@ -407,6 +408,7 @@ func (m *Machine) startVMM(ctx context.Context) error {
407
408
}
409
410
signal.Stop(sigchan)
411
+ close(sigchan)
412
close(m.exitCh)
413
414
0 commit comments