Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/libiberty/fdmatch.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2121/*
    2222
    23 NAME
     23@deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
    2424
    25         fdmatch -- see if two file descriptors refer to same file
     25Check to see if two open file descriptors refer to the same file.
     26This is useful, for example, when we have an open file descriptor for
     27an unnamed file, and the name of a file that we believe to correspond
     28to that fd.  This can happen when we are exec'd with an already open
     29file (@code{stdout} for example) or from the SVR4 @file{/proc} calls
     30that return open file descriptors for mapped address spaces.  All we
     31have to do is open the file by name and check the two file descriptors
     32for a match, which is done by comparing major and minor device numbers
     33and inode numbers.
    2634
    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
    4236
    4337BUGS
Note: See TracChangeset for help on using the changeset viewer.