This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/10840] New: glibc could now fix broken F_GETOWN


Userspace has long lived with a limitation in the system call convention
employed on Linux/x86 and some other architectures that means that if a file
descriptor is owned by a process group ID less than 4096, then, instead of
returning that ID as a negative function result from fcntl() F_GETOWN, glibc
misinterprets it as a system call error. This is because glibc (has little
choice but to) interpret negative system call returns in the range -1 to -4095
as indicating an error. This limitation means that an application that uses
process groups to receive "I/O possible" signals can't reliably use F_GETOWN to
discover which process group owns a file descriptor. Starting with kernel
2.6.32, Linux adds F_GETOWN_EX, which provides a way of returning the owner of a
file descriptor via a structure (f_owner_ex), which AFAICS means that glibc
could since Linux 2.6.32 intercept F_GETOWN operations and use F_GETOWN_EX to
ensure that the right value is returned to userspace.

-- 
           Summary: glibc could now fix broken F_GETOWN
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: mtk dot manpages at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10840

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]