diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-05 00:38:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-05 00:38:33 +0900 |
| commit | 9641805ec2025e8434e1120257f51d19b877c8e4 (patch) | |
| tree | a1a00c85cce2236df09834023cd2cdc68a88ddda /container | |
| parent | 0738f4889affa6794655ccfc4f7d31eba77e338d (diff) | |
container/init: ignore finished process
This is not considered an error, if the process finishes while the signal is being delivered.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container')
| -rw-r--r-- | container/init.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/container/init.go b/container/init.go index e8e95a7a..4d5bb8a9 100644 --- a/container/init.go +++ b/container/init.go @@ -495,7 +495,7 @@ func initEntrypoint(k syscallDispatcher, msg message.Msg) { case s := <-sig: if s == CancelSignal && params.ForwardCancel && cmd.Process != nil { msg.Verbose("forwarding context cancellation") - if err := k.signal(cmd, os.Interrupt); err != nil { + if err := k.signal(cmd, os.Interrupt); err != nil && !errors.Is(err, os.ErrProcessDone) { k.printf(msg, "cannot forward cancellation: %v", err) } continue |
