pidfd

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pidfd watches for processes to exit without holding a thread per process, so a worker can watch thousands of them.

It needs Linux 5.3+ for pidfd_open. Before 5.10, which added PIDFD_NONBLOCK, each watch falls back to a blocking poll on its own thread.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exited

func Exited(pid int) (<-chan struct{}, error)

Exited returns a channel that is closed once pid exits. pid is pinned when Exited is called, so a later reuse of the number is never mistaken for it. A process already gone yields a closed channel.

func ExitedFD

func ExitedFD(pidfd int) (<-chan struct{}, error)

ExitedFD is Exited for a process already pinned by pidfd. It watches a duplicate, so the caller keeps pidfd and may close it at any time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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