reaper

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandCombinedOutput

func CommandCombinedOutput(cmd *exec.Cmd) ([]byte, error)

CommandCombinedOutput is like cmd.CombinedOutput, but for use when the reaper is running.

func Start

func Start() error

Start starts the child process reaper.

func StartCommand

func StartCommand(cmd *exec.Cmd) error

StartCommand starts the command and registers its PID with the reaper.

After the reaper has been started, users of os/exec should call WaitCommand and StartCommand rather than cmd.Wait directly, to ensure PIDs are reaped correctly.

func Stop

func Stop() error

Stop stops the child process reaper.

func WaitCommand

func WaitCommand(cmd *exec.Cmd) (int, error)

WaitCommand waits for the command (which must have been started with StartCommand) to finish and returns its exit code. Unlike cmd.Wait, WaitCommand doesn't return an error for nonzero exit codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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