mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix(agent): Allow signal propagation when running as PID 1 (#6141)
This commit is contained in:
committed by
GitHub
parent
af59e2bcfa
commit
6f3f7f2937
@ -68,7 +68,10 @@ func workspaceAgent() *cobra.Command {
|
||||
// Do not start a reaper on the child process. It's important
|
||||
// to do this else we fork bomb ourselves.
|
||||
args := append(os.Args, "--no-reap")
|
||||
err := reaper.ForkReap(reaper.WithExecArgs(args...))
|
||||
err := reaper.ForkReap(
|
||||
reaper.WithExecArgs(args...),
|
||||
reaper.WithCatchSignals(InterruptSignals...),
|
||||
)
|
||||
if err != nil {
|
||||
logger.Error(ctx, "failed to reap", slog.Error(err))
|
||||
return xerrors.Errorf("fork reap: %w", err)
|
||||
|
Reference in New Issue
Block a user