.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH dirfd 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE dirfd \- obtiene el descriptor de fichero de un flujo de directorio .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBint dirfd(DIR *\fP\fIdirp\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBdirfd\fP(): .nf /* Desde glibc 2.10: */ _POSIX_C_SOURCE >= 200809L || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi .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 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; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBdirfd\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES POSIX.1\-2008. .SH HISTORIAL .\" It is present in libc5 (since 5.1.2) and in glibc 2. 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) .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 .