from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

210164

userrating:


May 25th. 2007:
Words

486

Views

259144

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

150498

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





fileno

Section: C Library Functions (3)
Updated: 202-0-08
Index Return to Main Contents
 

NAME

fileno - obtain file descriptor of a stdio stream  

LIBRARY

Standard C library (libc,~-lc)  

SYNOPSIS

#include <stdio.h>
int fileno(FILE *stream);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)): fileno():
    _POSIX_C_SOURCE
 

DESCRIPTION

The function fileno() examines the argument stream and returns the integer file descriptor used to implement this stream. The file descriptor is still owned by stream and will be closed when fclose(3) is called. Duplicate the file descriptor with dup(2) before passing it to code that might close it. For the nonlocking counterpart, see unlocked_stdio(3).  

RETURN VALUE

On success, fileno() returns the file descriptor associated with stream. On failure, -1 is returned and errno is set to indicate the error.  

ERRORS

EBADF
stream is not associated with a file.
 

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
fileno() Thread safetyM-Safe
 

STANDARDS

POSIX.-2008.  

HISTORY

POSIX.-2001.  

SEE ALSO

open(2), fdopen(3), stdio(3), unlocked_stdio(3)


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
ATTRIBUTES
STANDARDS
HISTORY
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 12.6 ms