From owner-cvs-src-old@FreeBSD.ORG Sun Mar 7 10:44:08 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC824106566B for ; Sun, 7 Mar 2010 10:44:08 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BB18A8FC08 for ; Sun, 7 Mar 2010 10:44:08 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o27Ai8Pf049986 for ; Sun, 7 Mar 2010 10:44:08 GMT (envelope-from ed@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o27Ai8jn049985 for cvs-src-old@freebsd.org; Sun, 7 Mar 2010 10:44:08 GMT (envelope-from ed@repoman.freebsd.org) Message-Id: <201003071044.o27Ai8jn049985@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ed@repoman.freebsd.org using -f From: Ed Schouten Date: Sun, 7 Mar 2010 10:43:45 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/linprocfs linprocfs.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 10:44:08 -0000 ed 2010-03-07 10:43:45 UTC FreeBSD src repository Modified files: sys/compat/linprocfs linprocfs.c Log: SVN rev 204825 on 2010-03-07 10:43:45Z by ed Make /proc/self/fd `work'. On Linux, /proc//fd is comparable to fdescfs, where it allows you to inspect the file descriptors used by each process. Glibc's ttyname() works by performing a readlink() on these nodes, since all nodes in this directory are symlinks. It is a bit hard to implement this in linprocfs right now, so I am not going to bother. Add a way to make ttyname(3) work, by adding a /proc//fd symlink, which points to /dev/fd only if the calling process matches. When fdescfs is mounted, this will cause the readlink() in ttyname() to fail, causing it to fall back on manually finding a matching node in /dev. Discussed on: emulation@ Revision Changes Path 1.144 +16 -0 src/sys/compat/linprocfs/linprocfs.c