Where do pipes reside?
Posted: Tue May 03, 2011 1:08 am
Hi, I am a newbie..,
Could any one please respond to the following query//
**Where do pipes reside...??
I am opening a pipe to the process 2 from process 1.
For example..,
Pipe1 pid is 1233
Pipe2 pid is 1267
When I am sending message from process1 to process2, only some 2 or 3 characters of the sent message is being received on process2 (where i am doing read(0,buf,size)) and even no message sometimes. So, I want to check whether some other process is consuming the data from the pipe.
so @ /proc/1267/fd, 'ls -lrt' gives the following:
lr-x------ 1 sudh 64 2011-05-03 11:55 11 -> pipe:/[1159058716]
l-wx------ 1 sudh 64 2011-05-03 11:55 10 -> pipe:/[1159058714]
lrwx------ 1 sudh 64 2011-05-03 11:55 1 -> /dev/pts/26
lrwx------ 1 sudh 64 2011-05-03 11:55 0 -> /dev/pts/26
In the above the fds on which I am working is 10, 11
I could not understand the numbers 1159058714 in pipe : / [ 1159058714 ]
*Is it the location of fd on kernel??
*Where do the pipes reside?? (Actual location, so that I can access)
*Is there any method to know what processes are accessing a file?
(I want to know this because, in my case the pipe data is not completely available when I am trying to read it from process2. So, I guess some intermediate process might be consuming that data. So, if I could check the processes acting upon that particular fd, i can get some clue)
(forgive me for my bad explanation)
Could any one please respond to the following query//
**Where do pipes reside...??
I am opening a pipe to the process 2 from process 1.
For example..,
Pipe1 pid is 1233
Pipe2 pid is 1267
When I am sending message from process1 to process2, only some 2 or 3 characters of the sent message is being received on process2 (where i am doing read(0,buf,size)) and even no message sometimes. So, I want to check whether some other process is consuming the data from the pipe.
so @ /proc/1267/fd, 'ls -lrt' gives the following:
lr-x------ 1 sudh 64 2011-05-03 11:55 11 -> pipe:/[1159058716]
l-wx------ 1 sudh 64 2011-05-03 11:55 10 -> pipe:/[1159058714]
lrwx------ 1 sudh 64 2011-05-03 11:55 1 -> /dev/pts/26
lrwx------ 1 sudh 64 2011-05-03 11:55 0 -> /dev/pts/26
In the above the fds on which I am working is 10, 11
I could not understand the numbers 1159058714 in pipe : / [ 1159058714 ]
*Is it the location of fd on kernel??
*Where do the pipes reside?? (Actual location, so that I can access)
*Is there any method to know what processes are accessing a file?
(I want to know this because, in my case the pipe data is not completely available when I am trying to read it from process2. So, I guess some intermediate process might be consuming that data. So, if I could check the processes acting upon that particular fd, i can get some clue)
(forgive me for my bad explanation)