File descriptor linked to socket or pipe in proc
Posted
by
primero
on Server Fault
See other posts from Server Fault
or by primero
Published on 2012-09-13T19:49:49Z
Indexed on
2012/09/13
21:40 UTC
Read the original article
Hit count: 209
i have a question regarding the file descriptors and their linkage in the proc file system. I've observed that if i list the file descriptors of a certain process from proc ls -la /proc/1234/fd
i get the following output:
lr-x------ 1 root root 64 Sep 13 07:12 0 -> /dev/null
l-wx------ 1 root root 64 Sep 13 07:12 1 -> /dev/null
l-wx------ 1 root root 64 Sep 13 07:12 2 -> /dev/null
lr-x------ 1 root root 64 Sep 13 07:12 3 -> pipe:[2744159739]
l-wx------ 1 root root 64 Sep 13 07:12 4 -> pipe:[2744159739]
lrwx------ 1 root root 64 Sep 13 07:12 5 -> socket:[2744160313]
lrwx------ 1 root root 64 Sep 13 07:12 6 -> /var/lib/log/some.log
I get the meaning of a file descriptor and i understand from my example the file descriptors 0 1 2 and 6, they are tied to physical resources on my computer, and also i guess 5 is connected to some resource on the network(because of the socket), but what i don't understand is the meaning of the numbers in the brackets. Do the point to some property of the resource? Also why are some of the links broken? And lastly as long as I asked a question already :) what is pipe?
© Server Fault or respective owner