MCPcopy
hub / github.com/docker/compose / StartWithNewGroupID

Function StartWithNewGroupID

pkg/e2e/cancel_test.go:87–99  ·  pkg/e2e/cancel_test.go::StartWithNewGroupID
(ctx context.Context, command icmd.Cmd, stdout *utils.SafeBuffer, stderr *utils.SafeBuffer)

Source from the content-addressed store, hash-verified

85}
86
87func 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}

Callers 2

TestComposeCancelFunction · 0.85

Calls 1

StartMethod · 0.65

Tested by

no test coverage detected