2 .\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .TH ISFDTYPE 3 2014-03-13 "Linux" "Linux Programmer's Manual"
28 isfdtype \- test file type of a file descriptor
31 .B #include <sys/stat.h>
32 .B #include <sys/socket.h>
34 .BI "int isfdtype(int " fd ", int " fdtype );
38 Feature Test Macro Requirements for glibc (see
39 .BR feature_test_macros (7)):
51 _BSD_SOURCE || _SVID_SOURCE
58 function tests whether the file descriptor
60 refers to a file of type
64 argument specifies one of the
75 function returns 1 if the file descriptor
80 On error, -1 is returned and
82 is set to indicate the cause.
86 function can fail with any of the same errors as
91 function is not specified in any standard,
92 but did appear in the draft POSIX.1g standard.
93 It is present on OpenBSD and Tru64 UNIX
94 (where the required header file in both cases is just
96 as shown in the POSIX.1g draft),
97 and possibly other systems.
99 Portable applications should use