1LCKDO(1)                           moreutils                          LCKDO(1)
2
3
4

NAME

6       lckdo - run a program with a lock held
7

SYNOPSIS

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

DESCRIPTION

12       lckdo runs a program with a lock held, in order to prevent multiple
13       processes from running in parallel. Use just like nice or nohup.
14
15       Now that util-linux contains a similar command named flock, lckdo is
16       deprecated, and will be removed from some future version of moreutils.
17

OPTIONS

19       -w
20           If the lock is already held by another process, wait for it to
21           complete instead of failing immediately.
22
23       -W {sec}
24           The same as -w but wait not more than sec seconds.
25
26       -e
27           Execute the program directly without forking and waiting (keeps an
28           extra file descriptor open).
29
30       -E {nnn}
31           Set the file descriptor number to keep open when exec()ing (implies
32           -e).
33
34       -n
35           Do not create the lock file if it does not exist.
36
37       -q
38           Produce no output if lock is already held.
39
40       -s
41           Lock in shared (read) mode.
42
43       -x
44           Lock in exclusive (write) mode (default).
45
46       -t
47           Test for lock existence.
48

EXIT STATUS

50       If the lock was successfully acquired, the return value is that of the
51       program invoked by lckdo. If the lock couldn't be acquired, EX_TEMPFAIL
52       is returned. If there was a problem opening/creating or locking the
53       lock file, EX_CANTCREAT or EX_OSERR will be returned.
54

AUTHOR

56       Michael Tokarev
57
58
59
60moreutils                         2007-08-15                          LCKDO(1)
Impressum