All of lore.kernel.org
 help / color / mirror / Atom feed
* Getting the file path of a file descriptor
@ 2016-07-18 19:13 Peter Chen
  2016-07-18 20:27 ` Frank Filz
  2016-07-19  1:59 ` Al Viro
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Chen @ 2016-07-18 19:13 UTC (permalink / raw)
  To: linux-fsdevel

Hi,

  I was wondering if I intercepted the system call such as read(). Can
I get the file path of the file descriptor somehow from the kernel
process's internal data structures or some helper functions? For
example if I had previously opened a file "abcd.txt", and then called
read on it, I would like to get the filepath "abcd.txt" from the fd
for the read().

   Also aside, I was wondering if it was all possible to get the file
path of the executable of the process itself. So if I was running a
program such as "ping", when I intercept the system calls of the
program, I want to know the filepath of the ping program.

Thanks,

Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-19  1:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-18 19:13 Getting the file path of a file descriptor Peter Chen
2016-07-18 20:27 ` Frank Filz
2016-07-19  1:33   ` Peter Chen
2016-07-19  1:59 ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.