From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7434 invoked by alias); 24 Oct 2009 03:46:05 -0000 Received: (qmail 7412 invoked by uid 48); 24 Oct 2009 03:45:52 -0000 Date: Sat, 24 Oct 2009 03:46:00 -0000 From: "mtk dot manpages at gmail dot com" To: glibc-bugs@sources.redhat.com Message-ID: <20091024034552.10840.mtk.manpages@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/10840] New: glibc could now fix broken F_GETOWN X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00072.txt.bz2 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.