Unix and Linux Discussions Tagged with locked |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
2,951 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
11,632 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
0 |
1,474 |
Programming |
|
|
|
3 |
9,582 |
Linux |
|
|
|
1 |
5,582 |
Programming |
|
|
|
0 |
3,257 |
OS X Support RSS |
|
|
|
0 |
854 |
Software Releases - RSS News |
|
|
|
0 |
794 |
Software Releases - RSS News |
|
|
|
2 |
39,185 |
Shell Programming and Scripting |
|
|
|
3 |
19,030 |
AIX |
|
|
|
0 |
795 |
Software Releases - RSS News |
|
|
|
0 |
1,893 |
Shell Programming and Scripting |
|
|
|
2 |
8,846 |
Programming |
|
|
|
0 |
883 |
Software Releases - RSS News |
|
|
|
5 |
16,925 |
Cybersecurity |
|
|
|
12 |
26,118 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
43,203 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
21,125 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,636 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
7,440 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
10,981 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
25,449 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,472 |
UNIX for Dummies Questions & Answers |
setlock(8) System Manager's Manual setlock(8)
NAME
setlock - runs another program with a file locked.
SYNOPSIS
setlock [ -nNxX ] fn child
DESCRIPTION
fn is a single argument. child consists of one or more arguments.
setlock opens fn for writing (creating it if it does not exist), obtains an exclusive lock on it, and runs child.
Normally the lock disappears when child exits.
Here's the complete story: child is given a descriptor for a locked ofile pointing to the disk file named fn. The lock disappears when
this ofile is
o closed by all the processes that have descriptors for it or
o explicitly unlocked.
OPTIONS
-n No delay. If fn is locked by another process, setlock gives up.
-N (Default.) Delay. If fn is locked by another process, setlock waits until it can obtain a new lock.
-x If fn cannot be opened (or created) or locked, setlock exits zero.
-X (Default.) If fn cannot be opened (or created) or locked, setlock prints an error message and exits nonzero.
SEE ALSO
supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64n(8),
tai64nlocal(8), setuidgid(8), envuidgid(8), envdir(8), softlimit(8)
http://cr.yp.to/daemontools.html
setlock(8)