linux/fs/proc
Linus Torvalds 1117f72ea0 vfs: show O_CLOEXE bit properly in /proc/<pid>/fdinfo/<fd> files
The CLOEXE bit is magical, and for performance (and semantic) reasons we
don't actually maintain it in the file descriptor itself, but in a
separate bit array.  Which means that when we show f_flags, the CLOEXE
status is shown incorrectly: we show the status not as it is now, but as
it was when the file was opened.

Fix that by looking up the bit properly in the 'fdt->close_on_exec' bit
array.

Uli needs this in order to re-implement the pfiles program:

  "For normal file descriptors (not sockets) this was the last piece of
   information which wasn't available.  This is all part of my 'give
   Solaris users no reason to not switch' effort.  I intend to offer the
   code to the util-linux-ng maintainers."

Requested-by: Ulrich Drepper <drepper@akkadia.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-06 11:51:33 -07:00
..
array.c ptrace: s/tracehook_tracer_task()/ptrace_parent()/ 2011-06-22 19:26:29 +02:00
base.c vfs: show O_CLOEXE bit properly in /proc/<pid>/fdinfo/<fd> files 2011-08-06 11:51:33 -07:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c proc: make struct proc_dir_entry::name a terminal array rather than a pointer 2011-07-27 12:50:45 -07:00
inode.c procfs: return ENOENT on opening a being-removed proc entry 2011-07-26 16:49:43 -07:00
internal.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd 2011-05-25 18:10:16 -07:00
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile ns: proc files for namespace naming policy. 2011-05-10 14:31:44 -07:00
meminfo.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
mmu.c
namespaces.c proc: Fix Oops on stat of /proc/<zombie pid>/ns/net 2011-06-15 14:35:29 -07:00
nommu.c
page.c
proc_devtree.c of/flattree: Drop an uninteresting message to pr_debug level 2011-03-02 13:45:18 -07:00
proc_net.c proc: make struct proc_dir_entry::name a terminal array rather than a pointer 2011-07-27 12:50:45 -07:00
proc_sysctl.c ->permission() sanitizing: don't pass flags to ->permission() 2011-07-20 01:43:24 -04:00
proc_tty.c
root.c proc: make struct proc_dir_entry::name a terminal array rather than a pointer 2011-07-27 12:50:45 -07:00
softirqs.c
stat.c proc/stat: use defined macro KMALLOC_MAX_SIZE 2011-05-26 17:12:37 -07:00
task_mmu.c proc: fix pagemap_read() error case 2011-05-26 17:12:37 -07:00
task_nommu.c report errors in /proc/*/*map* sanely 2011-03-23 16:36:50 -04:00
uptime.c
version.c
vmcore.c fs/proc/vmcore.c: add hook to read_from_oldmem() to check for non-ram pages 2011-05-26 17:12:37 -07:00