Manual Page Result
0
Command: flockfile | Section: 3 | Source: Digital UNIX | File: flockfile.3.gz
flockfile(3) Library Functions Manual flockfile(3)
NAME
flockfile - Locks a stdio stream
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <stdio.h> void flockfile(
FILE * file );
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
flockfile, POSIX.1c
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
PARAMETERS
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 pa-
rameter does not point to a valid FILE structure.
RELATED INFORMATION
Functions: funlockfile(3), getc_unlocked(3), putc_unlocked(3) delim off
flockfile(3)