logind

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT 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 logind asks systemd-logind whether processes a user leaves running survive the end of the login session they were started from.

With KillUserProcesses=yes (logind.conf) logind kills every process of a session's scope when the session ends, which would take detached holders spawned by the bridge (an SSH session) with it. Processes moved into a scope of the user's service manager (systemd-run --user --scope) leave the session; they still end with the service manager at the user's last logout unless lingering is enabled.

Index

Constants

This section is empty.

Variables

View Source
var KillUserProcessesCmd = []string{
	"busctl", "get-property", "org.freedesktop.login1", "/org/freedesktop/login1",
	"org.freedesktop.login1.Manager", "KillUserProcesses",
}

KillUserProcessesCmd reads logind's KillUserProcesses setting; the output is parsed with ParseBusctlBool.

Functions

func KillUserProcesses

func KillUserProcesses() (kill, known bool)

KillUserProcesses reports logind's KillUserProcesses setting. known is false off Linux and when logind cannot be asked.

func ParseBusctlBool

func ParseBusctlBool(out string) (v, ok bool)

ParseBusctlBool parses a boolean property as printed by busctl get-property ("b true"). ok is false for any other output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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