flockfile man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

flockfile(3S)							 flockfile(3S)

       flockfile(),   ftrylockfile(),  funlockfile()  -	 explicit  locking  of
       streams within a multithread application

       The and functions provide for  explicit	application-level  locking  of
       streams.	  These	 functions  can	 be  used  by  a thread to delineate a
       sequence of I/O statements that are to be executed as a unit.

       The function is used by a thread to acquire ownership of a object.

       The function is used by a thread to acquire ownership of	 a  object  if
       the object is available; is a non-blocking version of

       The function is used to relinquish the ownership granted to the thread.
       The behavior is undefined if a thread  other  than  the	current	 owner
       calls the function.

       Logically, there is a count associated with each stream.	 This count is
       implicitly initialized to zero when the stream is created.  The	stream
       is unlocked when the count is zero.  When the count is positive, a sin‐
       gle thread owns the stream.  When the function is called, if the	 count
       is zero or if the count is positive and the caller owns the stream, the
       count is incremented.  Otherwise,  the  calling	thread	is  suspended,
       waiting	for  the count to return to zero.  Each call to decrements the
       count.  This allows matching calls to (or successful calls to and to be

       All  POSIX.1  and C standard functions that reference objects behave as
       if they use and internally to obtain ownership of these objects.

       None for and The function returns zero for success and nonzero to indi‐
       cate that the lock cannot be acquired.


List of man pages available for HP-UX

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