lockfile

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package lockfile provides methods to associate process ids (PIDs) with a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLockfile

func CreateLockfile(file string) error

CreateLockfile associates the provided file with the process ID of the caller.

file should not contain any useful content because CreateLockfile may delete and recreate it.

Only one active process can be associated with a file at a time. Thus, if another active process is currently associated with file, then CreateLockfile will return an error.

func RemoveLockfile

func RemoveLockfile(file string)

RemoveLockfile removes file and the corresponding lock on it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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