zombie

command
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

README

Zombie Prevention Example

This example demonstrates how pkg/proc ensures child processes are cleaned up when the parent process exits manually or crashes.

How to Run

# Run the example (spawns a child process, then exits)
go run examples/zombie/main.go

The output will look like:

Parent starting child via proc.Start...
Child PID: 12345. Parent exiting now.

Verification

To verify that the child process (PID 12345) has been terminated, check the process list.

Windows (PowerShell)
Get-Process -Id 12345
# Expected Output:
# Get-Process : Cannot find a process with the process identifier 12345.
Linux (Bash)
ps -p 12345
# Expected Output:
# PID TTY          TIME CMD
# (No lines output, meaning process is gone)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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