| Click this button to go to the index for this section. |
flockfile(3)
NAME
flockfile - Locks a stdio streamLIBRARY
Standard C Library (libc.a)SYNOPSIS
#include <stdio.h> void flockfile( FILE * file );STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: flockfile, POSIX.1c Refer to the standards(5) reference page for more information about industry standards and associated tags.PARAMETERS
file Specifies the stream to be locked.DESCRIPTION
The flockfile() function locks a stdio stream so that a thread can have exclusive use of that stream for multiple I/O operations. Use the flockfile() function for a thread that wishes to ensure that the output of several printf() functions, for example, is not garbled by another thread also trying to use printf(). Matching flockfile() and funlockfile() calls can be nested. The behavior of the flockfile() function is unspecified if the file parameter does not point to a valid FILE structure.RELATED INFORMATION
Functions: funlockfile(3), getc_unlocked(3), putc_unlocked(3)