Question about Unix pipes

I would like to know if there is a way to print process-related pipes, such as "ipcs -s" for semaphores.

+4
source share
4 answers

The closest thing that comes to mind is lsof -p <pid>|grep FIFO .

+4
source

Yes there is. Pipes are file descriptors, and anything that shows open file descriptors (e.g. lsof) will show them.

+5
source

Well, pipes are just open file descriptors in * nix, so you can ask it to print open file descriptors for a specific process with

 lsof -p <process id> 

I do not know if there is a way to filter by creating a channel.

+2
source

For completeness, if you are on Linux but do not have lsof installed, you can do:

 ls -l /proc/<pid>/fd 
+2
source

All Articles