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
open_excl(3) FreeBSD Library Functions Manual open_excl(3)

open_excl - open a file for exclusive writing

#include <libowfat/open.h>

int open_excl(const char *filename);

open_excl opens the file filename for writing and returns the file handle. The file may not exist before the call to open_excl. The file will be created with mode 0600.

If there was an error creating the file, open_excl returns -1 and sets errno accordingly.

Since open_excl relies on the O_EXCL flag to open, it does not work reliably over NFS (the NFS protocol is broken) and must be emulated using a lock file (create a file with a unique file name and link(2) it to the lock file. Then stat the lock file and see if the link count is 2).

open(2)

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

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