MCPcopy Create free account
hub / github.com/delinoio/oss / initializeScope

Function initializeScope

cmds/async-commit-hook/internal/core/process_scope_linux.go:51–60  ·  view source on GitHub ↗
(s *processScope)

Source from the content-addressed store, hash-verified

49 }, nil
50}
51func initializeScope(s *processScope) error {
52 // A dedicated per-check subreaper adopts all orphaned descendants, even if
53 // every intermediate process exits between observations or calls setsid.
54 if err := unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0); err != nil {
55 return err
56 }
57 p, err := ProcessIdentity(os.Getpid())
58 s.Owner = p
59 return err
60}
61func drainScope(_ processScope, rootDone bool) (bool, error) {
62 rows, err := processRows()
63 if err != nil {

Callers 1

superviseProcessFunction · 0.70

Calls 1

ProcessIdentityFunction · 0.70

Tested by

no test coverage detected