busproxy

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package busproxy holds the connection code shared by the host-side proxies that serve names on the container's session bus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNotRunning

func CheckNotRunning(pidPath, subcommand string) error

CheckNotRunning returns an error when pidPath names a live process whose command line contains subcommand. A stale file, or one whose PID was reused by another program, does not count.

func Dial

func Dial(socketPath string, opts ...dbus.ConnOption) (*dbus.Conn, int, error)

Dial connects to the bus socket at socketPath and returns the connection together with the PID of the process that listens on the socket. The kernel reports that PID in the caller's PID namespace, so for the container's session bus it is a host PID of a process inside the container.

func RemoveOwnPID

func RemoveOwnPID(pidPath string)

RemoveOwnPID removes pidPath only when it holds the current process's PID, so an exiting second instance does not remove the file of a running one.

func WritePID

func WritePID(pidPath string) error

WritePID writes the current process's PID to pidPath.

Types

This section is empty.

Directories

Path Synopsis
Package busproxytest runs private dbus-daemons for proxy tests.
Package busproxytest runs private dbus-daemons for proxy tests.

Jump to

Keyboard shortcuts

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