Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/isfdtype.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/isfdtype.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/isfdtype.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/isfdtype.html on line 8
Determine whether a file descriptor refers to a socket
#include <sys/stat.h>
int isfdtype( int filedes,
int fdtype );
- fildes
- The file descriptor that you want to test.
- fdtype
- The properties you want to test for.
The valid values for fdtype include:
- S_IFSOCK — test whether filedes is a
socket.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The isfdtype() function determines whether the file descriptor
filedes has the properties identified by fdtype.
|
This function is based on a POSIX draft; for better portability, call
fstat()
and check the buffer that it fills in:
if ((buf.st_mode & S_IFMT) == fdtype)
/* The file descriptor matches fdtype. */
else
/* The file descriptor doesn't match fdtype. */
instead of calling isfdtype(). |
- 1
- The filedes file descriptor matches fdtype.
- 0
- The filedes file descriptor doesn't match fdtype.
- -1
- An error occurred (errno is set).
- EBADF
- Invalid file descriptor filedes.
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
fstat(),
isatty(),
socket(),
stat()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/isfdtype.html on line 173
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/isfdtype.html on line 173