proc

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: GPL-3.0, LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package proc contains utilities for checking processes via /proc.

Index

Constants

This section is empty.

Variables

View Source
var ErrUserBusy = errors.New("user is currently used by process")

ErrUserBusy is returned by CheckUserBusy if the user is currently used by a process.

Functions

func CheckUserBusy

func CheckUserBusy(name string, uid uint32) error

CheckUserBusy checks if a user is currently running any processes.

It is a re-implementation of this user_busy_processes() function: https://github.com/shadow-maint/shadow/blob/e78742e553c12222b40b13224d3b0fafaceae791/lib/user_busy.c#L164-L272

It returns ErrUserBusy if the user has active processes, nil otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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