app: integrate interrupt forwarding

This significantly increases usability of command line tools running through hakurei.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-07-29 02:21:12 +09:00
parent ddf48a6c22
commit b43d104680
12 changed files with 76 additions and 18 deletions

View File

@@ -32,6 +32,10 @@ func newContainer(s *hst.ContainerConfig, os sys.State, uid, gid *int) (*contain
SeccompPresets: s.SeccompPresets,
RetainSession: s.Tty,
HostNet: s.Net,
// the container is canceled when shim is requested to exit or receives an interrupt or termination signal;
// this behaviour is implemented in the shim
ForwardCancel: !s.ImmediateTermination,
}
{