Help us shape the future of Go! Take the 2026 Go Developer Survey

childproc

package
v0.0.182 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package childproc runs a program in the foreground on behalf of a bork command, the way a shell would.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err *exec.ExitError) int

ExitCode is the status to exit with for a program that ended with err: its own exit code, or 128 plus the signal number if a signal killed it, as shells report it.

func Run

func Run(cmd *exec.Cmd) error

Run starts cmd and waits for it. While it runs, SIGINT and SIGTERM no longer stop the caller, so it cannot exit and orphan the program; they are forwarded to the program instead. A signal sent to the whole process group, such as a terminal's Ctrl+C, then reaches the program twice in quick succession; generated programs count both as one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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