.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH DIRFD 3 "11 Abril 2020" Linux "Manual del Programador de Linux" .SH NOMBRE dirfd \- obtiene el descriptor de fichero de un flujo de directorio .SH SINOPSIS \fB#include \fP .br \fB#include \fP .PP \fBint dirfd(DIR *\fP\fIdirp\fP\fB);\fP .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBdirfd\fP(): .br .RS 4 .PD 0 .ad l /* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200809L || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .PD .RE .ad .SH DESCRIPCIÓN La función \fBdirfd\fP() devuelve el descriptor de fichero asociado con el flujo de directorio \fIdirp\fP. .PP This file descriptor is the one used internally by the directory stream. As a result, it is useful only for functions which do not depend on or alter the file position, such as \fBfstat\fP(2) and \fBfchdir\fP(2). It will be automatically closed when \fBclosedir\fP(3) is called. .SH "VALOR DEVUELTO" On success, \fBdirfd\fP() returns a file descriptor (a nonnegative integer). On error, \-1 is returned, and \fIerrno\fP is set to indicate the cause of the error. .SH ERRORES .\" glibc 2.8 POSIX.1\-2008 specifies two errors, neither of which is returned by the current implementation. .TP \fBEINVAL\fP \fIdirp\fP does not refer to a valid directory stream. .TP \fBENOTSUP\fP The implementation does not support the association of a file descriptor with a directory. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interfaz Atributo Valor T{ \fBdirfd\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .SH "CONFORME A" .\" It is present in libc5 (since 5.1.2) and in glibc2. POSIX.1\-2008. This function was a BSD extension, present in 4.3BSD\-Reno, not in 4.2BSD. .SH "VÉASE TAMBIÉN" \fBopen\fP(2), \fBopenat\fP(2), \fBclosedir\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3), \fBscandir\fP(3), \fBseekdir\fP(3), \fBtelldir\fP(3) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .