open_excl man page on Alpinelinux

Man page or keyword search:  
man Server   18016 pages
apropos Keyword Search (all sections)
Output format
Alpinelinux logo
[printable version]

open_excl(3)							  open_excl(3)

NAME
       open_excl - open a file for exclusive writing

SYNTAX
       #include <open.h>

       int open_excl(const char *filename);

DESCRIPTION
       open_excl opens the file filename for writing and returns the file han‐
       dle.  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).

SEE ALSO
       open(2)

								  open_excl(3)
[top]

List of man pages available for Alpinelinux

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net