Skip to content

Commit

Permalink
Merge pull request #209 from articulate/fix/remove-set-pgid
Browse files Browse the repository at this point in the history
fix: remove set group pid
  • Loading branch information
mloberg authored May 15, 2024
2 parents b9139af + e1b3347 commit 4fa79e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ func run(ctx context.Context, name string, args, env []string, l *slog.Logger) i
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
if name != "bash" && name != "sh" && name != "zsh" && name != "fish" {
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
}

if err := cmd.Start(); err != nil {
l.ErrorContext(ctx, "Could not start command", "error", err, "cmd", cmd.String())
Expand Down Expand Up @@ -182,7 +179,7 @@ func run(ctx context.Context, name string, args, env []string, l *slog.Logger) i
go func() {
<-exitch
time.Sleep(killWait)
l.DebugContext(ctx, "Terminating unrespnsive process", "cmd", cmd.String())
l.WarnContext(ctx, "Terminating unrespnsive process", "cmd", cmd.String())
cancel()
}()

Expand Down

0 comments on commit 4fa79e4

Please sign in to comment.