lockutil

package
v0.0.0-...-ff5f600 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package lockutil contains utilities for building file locks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLockFile

func CreateLockFile(dir, file string) (string, error)

CreateLockFile writes information about the process that holds the lock to a temporary file having the specified name prefix in the specified directory. It returns the name of the temporary file.

func StillHeld

func StillHeld(info []byte) (bool, error)

StillHeld verifies if the given lock information corresponds to a running process. False positives are allowed (returning true when in fact the lock holder process no longer runs), but false negatives should be disallowed (returning false when in fact the lock holder still runs -- since that leads to poaching active locks).

Types

This section is empty.

Jump to

Keyboard shortcuts

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