executable

package
v0.0.0-...-d95a457 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package executable has functions to return the executable path or directory and other process testing functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryDuplicateProcessIDs

func BinaryDuplicateProcessIDs(binary string) (pids []int, err error)

BinaryDuplicateProcessIDs returns all pids belonging to processes with the same passed binary name.

func Dir

func Dir() (dir string, err error)

Dir returns the running executable process's directory.

func DuplicateProcessIDs

func DuplicateProcessIDs() (pids []int, err error)

DuplicateProcessIDs returns all pids belonging to processes with the same binary name as the running program.

func FindDuplicateProcess

func FindDuplicateProcess(binary string) (*os.Process, int, error)

FindDuplicateProcess looks for any other processes with the same binary name as passed in and returns the first one found.

func NowRunning

func NowRunning() bool

NowRunning returns true if there is a running process whose binary has the same name as this one.

func Path

func Path() (string, error)

Path returns the executable path of the running process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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