pidowner

package
v0.0.0-...-113f59a Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package pidowner handles lookups from process ID to its owning user.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented for GOOS=" + runtime.GOOS)
View Source
var ErrProcessNotFound = errors.New("process not found")

Functions

func OwnerOfPID

func OwnerOfPID(pid int) (userID string, err error)

OwnerOfPID returns the user ID that owns the given process ID.

The returned user ID is suitable to passing to os/user.LookupId.

The returned error will be ErrNotImplemented for operating systems where this isn't supported.

Types

This section is empty.

Jump to

Keyboard shortcuts

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