mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
Update golangci-lint to v2.6.2
This commit is contained in:
@@ -19,18 +19,19 @@ limitations under the License.
|
||||
package util
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// Exec creates a new process with the specified arguments.
|
||||
func Exec(name string, arg ...string) *exec.Cmd {
|
||||
func Exec(ctx context.Context, name string, arg ...string) *exec.Cmd {
|
||||
// create a process group
|
||||
sysProcAttr := &syscall.SysProcAttr{
|
||||
Setpgid: true,
|
||||
}
|
||||
cmd := exec.Command(name, arg...)
|
||||
cmd := exec.CommandContext(ctx, name, arg...)
|
||||
cmd.SysProcAttr = sysProcAttr
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user