UNLOCKED_GETC(3S) BSD UNLOCKED_GETC(3S)
NAME
unlocked_getc, unlocked_getchar - get a character from an input stream
SYNOPSIS
#include <stdio.h>
int unlocked_getc (FILE * file);
int unlocked_getchar ( void );
DESCRIPTION
The unlocked_getc and unlocked_getchar functions are functionally
identical to the getc and getchar functions, except that unlocked_getc
and unlocked_getchar may be safely used only within a scope that is
protected by the flockfile and funlockfile() functions used as a pair.
The caller must ensure that the stream is locked before these functions
are used.
DIAGNOSTICS
The integer constant EOF is returned at the end of the file or upon an
error.
SEE ALSO
flockfile(3S), funlockfile(3S), getc(3S)