GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LCKDO (1)

.ds Aq ’

NAME

lckdo - run a program with a lock held

CONTENTS

SYNOPSIS

lckdo [options] {lockfile} {program} [arguments]

DESCRIPTION

lckdo runs a program with a lock held, in order to prevent multiple processes from running in parallel. Use just like nice or nohup.

Now that util-linux contains a similar command named flock, lckdo is deprecated, and will be removed from some future version of moreutils.

OPTIONS

-w

If the lock is already held by another process, wait for it to complete instead of failing immediately.

-W {sec}

The same as -w but wait not more than sec seconds.

-e

Execute the program directly without forking and waiting (keeps an extra file descriptor open).

-E {nnn}

Set the file descriptor number to keep open when exec()ing (implies -e).

-n

Do not create the lock file if it does not exist.

-q

Produce no output if lock is already held.

-s

Lock in shared (read) mode.

-x

Lock in exclusive (write) mode (default).

-t

Test for lock existence.

EXIT STATUS

If the lock was successfully acquired, the return value is that of the program invoked by lckdo. If the lock couldnt be acquired, EX_TEMPFAIL is returned. If there was a problem opening/creating or locking the lock file, EX_CANTCREAT or EX_OSERR will be returned.

AUTHOR

Michael Tokarev

Search for    or go to Top of page |  Section 1 |  Main Index


moreutils LCKDO (1) 2007-08-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.