mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
Handle SIGPIPE to prevent machine stuck in Starting state
Fixes: #26949 Signed-off-by: Jiri Dostal <jdostal@redhat.com>
This commit is contained in:

committed by
openshift-cherrypick-robot

parent
696b884e76
commit
1751612f33
@ -483,7 +483,7 @@ func Start(mc *vmconfigs.MachineConfig, mp vmconfigs.VMProvider, dirs *machineDe
|
|||||||
// if the machine cannot continue starting due to a signal, ensure the state
|
// if the machine cannot continue starting due to a signal, ensure the state
|
||||||
// reflects the machine is no longer starting
|
// reflects the machine is no longer starting
|
||||||
signalChan := make(chan os.Signal, 1)
|
signalChan := make(chan os.Signal, 1)
|
||||||
signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)
|
signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM, syscall.SIGPIPE)
|
||||||
go func() {
|
go func() {
|
||||||
sig, ok := <-signalChan
|
sig, ok := <-signalChan
|
||||||
if ok {
|
if ok {
|
||||||
|
Reference in New Issue
Block a user