Scroll to navigation

isfdtype(3) Library Functions Manual isfdtype(3)

NOM

isfdtype - Tester le type de fichier d'un descripteur de fichier

BIBLIOTHÈQUE

Bibliothèque C standard (libc, -lc)

SYNOPSIS

#include <sys/stat.h>
#include <sys/socket.h>
int isfdtype(int fd, int fdtype);

Exigences de macros de test de fonctionnalités pour la glibc (consulter feature_test_macros(7)) :

isfdtype() :


Since glibc 2.20:
_DEFAULT_SOURCE
Before glibc 2.20:
_BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

La fonction isfdtype() teste si le descripteur de fichier fd fait référence à un fichier de type fdtype. L'argument fdtype indique une des constantes S_IF* de <sys/stat.h> documentées dans stat(2) (S_IFREG par exemple).

VALEUR RENVOYÉE

The isfdtype() function returns 1 if the file descriptor fd is of type fdtype and 0 if it is not. On failure, -1 is returned and errno is set to indicate the error.

ERREURS

The isfdtype() function can fail with any of the same errors as fstat(2).

STANDARDS

La fonction isfdtype() n'est spécifiée par aucun standard mais est apparue dans l'ébauche du standard POSIX.1g. Elle est présente dans OpenBSD et Tru64 UNIX (où le fichier d'en-tête n'est autre que <sys/stat.h> dans les deux cas, comme indiqué dans l'ébauche de POSIX.1g), et possiblement sur d'autres systèmes.

NOTES

Portable applications should use fstat(2) instead.

VOIR AUSSI

fstat(2)

TRADUCTION

La traduction française de cette page de manuel a été créée par Christophe Blaess <https://www.blaess.fr/christophe/>, Stéphan Rafin <stephan.rafin@laposte.net>, Thierry Vignaud <tvignaud@mandriva.com>, François Micaux, Alain Portal <aportal@univ-montp2.fr>, Jean-Philippe Guérard <fevrier@tigreraye.org>, Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>, Julien Cristau <jcristau@debian.org>, Thomas Huriaux <thomas.huriaux@gmail.com>, Nicolas François <nicolas.francois@centraliens.net>, Florentin Duneau <fduneau@gmail.com>, Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, Denis Barbier <barbier@debian.org>, David Prévot <david@tilapin.org> et Grégoire Scano <gregoire.scano@malloc.fr>

Cette traduction est une documentation libre ; veuillez vous reporter à la GNU General Public License version 3 concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE.

Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à debian-l10n-french@lists.debian.org.

30 octobre 2022 Pages du manuel de Linux 6.03