Changeset 609 for branches/GNU/src/binutils/libiberty/fdmatch.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/libiberty/fdmatch.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 21 21 /* 22 22 23 NAME 23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2}) 24 24 25 fdmatch -- see if two file descriptors refer to same file 25 Check to see if two open file descriptors refer to the same file. 26 This is useful, for example, when we have an open file descriptor for 27 an unnamed file, and the name of a file that we believe to correspond 28 to that fd. This can happen when we are exec'd with an already open 29 file (@code{stdout} for example) or from the SVR4 @file{/proc} calls 30 that return open file descriptors for mapped address spaces. All we 31 have to do is open the file by name and check the two file descriptors 32 for a match, which is done by comparing major and minor device numbers 33 and inode numbers. 26 34 27 SYNOPSIS 28 29 int fdmatch (int fd1, int fd2) 30 31 DESCRIPTION 32 33 Check to see if two open file descriptors refer to the same file. 34 This is useful, for example, when we have an open file descriptor 35 for an unnamed file, and the name of a file that we believe to 36 correspond to that fd. This can happen when we are exec'd with 37 an already open file (stdout for example) or from the SVR4 /proc 38 calls that return open file descriptors for mapped address spaces. 39 All we have to do is open the file by name and check the two file 40 descriptors for a match, which is done by comparing major&minor 41 device numbers and inode numbers. 35 @end deftypefn 42 36 43 37 BUGS -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.