Skip to content

Commit

Permalink
func: remove the subreaper
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanadelacuesta committed May 2, 2024
1 parent 9e82c44 commit 603c40a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions drivers/shared/executor/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ func CreateExecutor(
isolateCommand(config.Cmd)
}

/* if err := setAsSubreaper(); err != nil {
return nil, nil, fmt.Errorf("unable to set nomad as subreaper: %v", err)
} */

return newExecutorClient(config, logger)
}

Expand Down
6 changes: 0 additions & 6 deletions drivers/shared/executor/utils_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ package executor
import (
"os/exec"
"syscall"

"golang.org/x/sys/unix"
)

// isolateCommand sets the setsid flag in exec.Cmd to true so that the process
Expand All @@ -22,7 +20,3 @@ func isolateCommand(cmd *exec.Cmd) {
}
cmd.SysProcAttr.Setsid = true
}

func setAsSubreaper() error {
return unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(1), 0, 0, 0)
}
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ require (
github.com/cilium/ebpf v0.9.1 // indirect
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible // indirect
github.com/circonus-labs/circonusllhist v0.1.3 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/containerd v1.7.13 // indirect
github.com/containerd/log v0.1.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/container-storage-interface/spec v1.7.0 h1:gW8eyFQUZWWrMWa8p1seJ28gwDoN5CVJ4uAbQ+Hdycw=
github.com/container-storage-interface/spec v1.7.0/go.mod h1:JYuzLqr9VVNoDJl44xp/8fmCOvWPDKzuGTwCoklhuqk=
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
Expand Down

0 comments on commit 603c40a

Please sign in to comment.