Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > F

fileno(3S)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

fileno() — map stream pointer to file descriptor

SYNOPSIS

#include <stdio.h>

int fileno(FILE *stream);

Obsolescent Interfaces

int fileno_unlocked(FILE *stream);

DESCRIPTION

fileno() returns the integer file descriptor associated with the named stream; see open(2).

The following symbolic values in <unistd.h> define the file descriptors associated with stdin, stdout, and stderr when a program is started :

STDIN_FILENO

Value of zero for standard input, stdin.

STDOUT_FILENO

Value of 1 for standard output, stdout.

STDERR_FILENO

Value of 2 for standard error, stderr.

Obsolescent Interfaces

fileno_unlocked() map stream pointer to file descriptor

APPLICATION USAGE

fileno_unlocked() is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use fileno().

RETURN VALUE

Upon error, fileno() and fileno_unlocked() return -1.

STANDARDS CONFORMANCE

fileno(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.