subreaper

package
v0.0.0-...-d7273bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2022 License: ISC Imports: 2 Imported by: 0

Documentation

Overview

Package subreaper sets the process as the init for descendant processes.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() bool

Get indicates whether the current process is the init process for descendant processes.

Example
package main

import (
	"fmt"

	"github.com/msantos/goreap/subreaper"
)

func main() {
	fmt.Println(subreaper.Get())
}
Output:

true

func Set

func Set() error

Set configures the process as a subreaper.

Example
package main

import (
	"fmt"

	"github.com/msantos/goreap/subreaper"
)

func main() {
	if err := subreaper.Set(); err != nil {
		fmt.Println("failed to set subreaper:", err)
	}
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL