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.
2 parents 8418667 + d07e42b commit fa57c34Copy full SHA for fa57c34
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:
@@ -406,6 +407,8 @@ func (m *Machine) startVMM(ctx context.Context) error {
406
407
m.err = err
408
}
409
410
+ signal.Stop(sigchan)
411
+ close(sigchan)
412
close(m.exitCh)
413
414
0 commit comments