iloveladyfingers
iloveladyfingers

Reputation: 55

How do we find out the process ID of the process, reading a named pipe/ FIFO in LINUX?

I have a FIFO/named pipe, which is opened for writing.

fd = open(FILE_PATH, O_WRONLY | O_CREAT, (mode_t) 0600);

As soon as another process opens the pipe for reading, I want to find out the process ID of the reading process. What is the best way to do this?

Upvotes: 2

Views: 169

Answers (0)

Related Questions