I would like to know, if there is a way to print the pipes associated with a process, like "ipcs -s" for semaphores.
+4
A:
Yes, there is. Pipes are file handles, and anything that shows open filehandles (lsof, for instance) will show them.
Daniel
2009-07-29 01:40:36
+2
A:
Well, pipes are just open file descriptors in *nix, so you could ask it to print the open file descriptors for a specific process with:
lsof -p <process id>
I don't know if there's a way to filter by pipe creation, though.
Bob Somers
2009-07-29 01:41:55
+2
A:
For completeness, if you're on Linux but don't have lsof installed, you can do:
ls -l /proc/<pid>/fd
bdonlan
2009-07-29 01:52:20
For linux, but not for arbitrary unixes...
dmckee
2009-07-29 01:54:48
@dmckee, good point, fixed.
bdonlan
2009-07-29 02:22:50