lockcheck

package
v0.0.0-...-ec59030 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package lockcheck detects processes that hold file locks on a directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatProcessList

func FormatProcessList(procs []LockingProcess) string

FormatProcessList returns a formatted string of locking processes.

func KillProcess

func KillProcess(pid int) error

KillProcess terminates a process by PID on Unix.

Types

type LockingProcess

type LockingProcess struct {
	PID  int
	Name string
}

LockingProcess represents a process that is locking a path.

func FindLockingProcesses

func FindLockingProcesses(dirPath string) ([]LockingProcess, error)

FindLockingProcesses uses lsof to detect processes with open files in dirPath.

func (LockingProcess) String

func (p LockingProcess) String() string

String returns a human-readable representation.

Jump to

Keyboard shortcuts

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