(ctx context.Context, command icmd.Cmd, stdout *utils.SafeBuffer, stderr *utils.SafeBuffer)
| 85 | } |
| 86 | |
| 87 | func StartWithNewGroupID(ctx context.Context, command icmd.Cmd, stdout *utils.SafeBuffer, stderr *utils.SafeBuffer) (*exec.Cmd, error) { |
| 88 | cmd := exec.CommandContext(ctx, command.Command[0], command.Command[1:]...) |
| 89 | cmd.Env = command.Env |
| 90 | cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} |
| 91 | if stdout != nil { |
| 92 | cmd.Stdout = stdout |
| 93 | } |
| 94 | if stderr != nil { |
| 95 | cmd.Stderr = stderr |
| 96 | } |
| 97 | err := cmd.Start() |
| 98 | return cmd, err |
| 99 | } |
no test coverage detected