Name
-d2.9
Synopsis
The -d2.9 debugging switch tells
sendmail to display the properties of each open
file descriptor. That output is produced by the
dumpfd( ) routine, and each line of output is
for a single file descriptor:
number: fl=flags mode=mode type stats
Here, the number is the count of the open file descriptor. Note that descriptors 0, 1, and 2 are usually tied to the standard input, output, and error output, respectively.
The flags is a hexadecimal representation of the state flags associated with a file descriptor. F_GETFL is used with ioctl(2) to fetch each, and all are described in <sys/fcntl.h> on most systems.
The mode is printed in octal and is the st_mode associated with an fstat(2) of the file descriptor.
The type examines the file type portion of the st_mode and prints SOCK for a socket, CHR: for a character special device, BLK: for a block special device, FIFO: for a named pipe, DIR: for a directory, LNK: for a symbolic link, and nothing otherwise (e.g., nothing if it is a file).
The stats are printed for all but the socket. They look like this:
dev=major/minor ino=inum nlink=nlink u/gid=user-id/group-id size=bytes
Here the dev= shows the major and minor device
numbers for the device that the file descriptor is associated with.
The inum is the inode number on the disk (if
there is one) and nlink is the number of hard
links to the file on disk. The u/gid shows the
user and group ownership associated with the file descriptor. The
bytes is the number of bytes in a file, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access