isfdtype man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]

ISFDTYPE(3)		    BSD Programmer's Manual		   ISFDTYPE(3)

NAME
     isfdtype - test if a file descriptor is of a specified type

SYNOPSIS
     #include <sys/stat.h>

     int
     isfdtype(int fd, int fdtype);

DESCRIPTION
     The isfdtype() call determines whether the file descriptor fd refers to a
     file or object of the type identified by fdtype. The following values of
     fdtype are supported:

     S_IFSOCK	  Returns true if the descriptor refers to a socket or fifo.

     S_IFIFO	  Returns true if the descriptor refers to a fifo or socket.

     S_IFCHR	  Returns true if the descriptor refers to a character special
		  device.

     S_IFDIR	  Returns true if the descriptor refers to a directory.

     S_IFBLK	  Returns true if the descriptor refers to a block special de-
		  vice.

     S_IFREG	  Returns true if the descriptor refers to a regular file.

     S_IFTTY	  Returns true if the descriptor refers to a character special
		  device for a terminal (see tty(4)).

DIAGNOSTICS
     The function returns 0 if the descriptor is not of the specified type,
     and a 1 if the descriptor is of that type.	 It returns -1 if an error is
     detected.

ERRORS
     The call succeeds unless:

     [EBADF]   fd is not a valid descriptor.

SEE ALSO
     stat(2),  isatty(3),  tty(4)

STANDARDS
     The isatty() function conforms to draft 6.6 of IEEE Std 1003.1g when
     fdtype is S_IFSOCK.  The other types are provided as extensions.

			       October 31, 1997				     1
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net