Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Mar 2010 10:43:45 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/compat/linprocfs linprocfs.c
Message-ID:  <201003071044.o27Ai8jn049985@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

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/<pid>/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/<pid>/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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003071044.o27Ai8jn049985>