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
setlock(8) FreeBSD System Manager's Manual setlock(8)

setlock - runs another program with a file locked.

setlock [ -nNxX ] fn child

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.

-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.

envdir(8), envini(8), envuidgid(8), fghack(8), multilog(8), pgrphack(8), readproctitle(8), setuidgid(8), setuser(8), softlimit(8), supervise(8), svc(8), svok(8), svscan(8), svscanboot(8), svstat(8), tai64n(8), tai64nlocal(8)

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

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