* [PATCH] proc(5): document /proc/[pid]/fd/ symlinks a bit more
@ 2013-06-14 17:19 Mike Frysinger
[not found] ` <1371230352-15529-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2013-06-14 17:19 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
This covers the type:[inode] syntax used in this dir.
Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
---
man5/proc.5 | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/man5/proc.5 b/man5/proc.5
index 5ecdd87..05675b2 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -220,13 +220,24 @@ with the
.I \-inum
option can be used to locate the file.
.TP
-.I /proc/[pid]/fd
+.I /proc/[pid]/fd/
This is a subdirectory containing one entry for each file which the
process has open, named by its file descriptor, and which is a
symbolic link to the actual file.
Thus, 0 is standard input, 1 standard output, 2 standard error, etc.
-.\" The following was still true as at kernel 2.6.13
+For fds open to non-files, they will be symlinks to the type with the inode.
+A
+.BR readlink (2)
+call on this file returns a string in the format:
+.br
+ type:[inode]
+.br
+For example, socket:[2248868] will be a socket and its inode is 2248868.
+For sockets, that inode can be used to find more info in one of the files under
+.IR /proc/net/ .
+
+.\"The following was still true as at kernel 2.6.13
In a multithreaded process, the contents of this directory
are not available if the main thread has already terminated
(typically by calling
--
1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] proc(5): document /proc/[pid]/fd/ symlinks a bit more
[not found] ` <1371230352-15529-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2013-06-26 23:58 ` Michael Kerrisk
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk @ 2013-06-26 23:58 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA
On 06/14/13 19:19, Mike Frysinger wrote:
> This covers the type:[inode] syntax used in this dir.
Thanks, Mike. I've applied this, with some tweaks. See the
version in Git.
Cheers,
Michael
> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> ---
> man5/proc.5 | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/man5/proc.5 b/man5/proc.5
> index 5ecdd87..05675b2 100644
> --- a/man5/proc.5
> +++ b/man5/proc.5
> @@ -220,13 +220,24 @@ with the
> .I \-inum
> option can be used to locate the file.
> .TP
> -.I /proc/[pid]/fd
> +.I /proc/[pid]/fd/
> This is a subdirectory containing one entry for each file which the
> process has open, named by its file descriptor, and which is a
> symbolic link to the actual file.
> Thus, 0 is standard input, 1 standard output, 2 standard error, etc.
>
> -.\" The following was still true as at kernel 2.6.13
> +For fds open to non-files, they will be symlinks to the type with the inode.
> +A
> +.BR readlink (2)
> +call on this file returns a string in the format:
> +.br
> + type:[inode]
> +.br
> +For example, socket:[2248868] will be a socket and its inode is 2248868.
> +For sockets, that inode can be used to find more info in one of the files under
> +.IR /proc/net/ .
> +
> +.\"The following was still true as at kernel 2.6.13
> In a multithreaded process, the contents of this directory
> are not available if the main thread has already terminated
> (typically by calling
>
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-26 23:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 17:19 [PATCH] proc(5): document /proc/[pid]/fd/ symlinks a bit more Mike Frysinger
[not found] ` <1371230352-15529-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2013-06-26 23:58 ` Michael Kerrisk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).