Content-type: text/html Man page of flockfile

flockfile

Section: C Library Functions (3)
Index Return to Main Contents
 

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 standards as follows:

flockfile, POSIX.1c

Refer to the standards(5) reference page for more information about industry 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 parameter does not point to a valid FILE structure.  

RELATED INFORMATION

Functions: funlockfile(3), getc_unlocked(3), putc_unlocked(3) delim off


 

Index

NAME
LIBRARY
SYNOPSIS
STANDARDS
PARAMETERS
DESCRIPTION
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:58 GMT, October 02, 2010