platform

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 10 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateDevelopmentEnvironment

func ActivateDevelopmentEnvironment() error

ActivateDevelopmentEnvironment redirects vev's XDG roots into an isolated development tree when VEV_ENV is set. The absolute .dev base is retained in VEV_ENV_ROOT so re-executed roles do not rebase after changing directory.

func ConfigPath

func ConfigPath() string

ConfigPath returns the user config file path: $XDG_CONFIG_HOME/vev/config if set, else ~/.config/vev/config.

func DevelopmentEnvironmentTempDir

func DevelopmentEnvironmentTempDir() (string, bool)

DevelopmentEnvironmentTempDir returns the private temporary-file directory for an activated development environment. Ordinary invocations use the existing os.TempDir fallback in the daemon.

func DirOrHome

func DirOrHome(dir string) string

DirOrHome returns dir when it names an existing directory. Otherwise it falls back to the current user's home directory, then to / as a last resort.

func ProcessArgv

func ProcessArgv(pid int) ([]string, error)

ProcessArgv returns argv from /proc/<pid>/cmdline.

func ProcessComm

func ProcessComm(pid int) (string, error)

ProcessComm returns the command name from /proc/<pid>/comm.

func ProcessCwd

func ProcessCwd(pid int) (string, error)

ProcessCwd returns the current working directory for a Linux process.

func ProcessGroupArgv

func ProcessGroupArgv(pgid int, shellPid int) ([]string, error)

ProcessGroupArgv returns argv for a restorable foreground process in pgid. A bare pane shell (the only process in its foreground group) returns nil argv.

func RuntimeDirFor

func RuntimeDirFor(getenv func(string) string, cwd string) string

RuntimeDirFor returns the XDG_RUNTIME_DIR a vev process with environment getenv and working directory cwd uses once VEV_ENV is activated. It lets a caller resolve another process' runtime from its initial environment.

func StateDir

func StateDir() string

StateDir returns the directory vev writes state to: $XDG_STATE_HOME/vev if set, else ~/.local/state/vev.

Types

type ProcessInspector

type ProcessInspector struct {
	// contains filtered or unexported fields
}

ProcessInspector implements ports.ProcessInspector using Linux /proc.

func NewProcessInspector

func NewProcessInspector() *ProcessInspector

NewProcessInspector returns a Linux /proc-backed process inspector.

func (*ProcessInspector) Argv

func (p *ProcessInspector) Argv(pid int) ([]string, error)

func (*ProcessInspector) Comm

func (p *ProcessInspector) Comm(pid int) (string, error)

func (*ProcessInspector) Cwd

func (p *ProcessInspector) Cwd(pid int) (string, error)

func (*ProcessInspector) GroupArgv

func (p *ProcessInspector) GroupArgv(pgid int, shellPid int) ([]string, error)

Source Files

  • dir.go
  • proc_linux.go
  • process.go
  • process_linux.go

Jump to

Keyboard shortcuts

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