Skip to main content
added 10 characters in body
Source Link
Stéphane Chazelas
  • 586.9k
  • 96
  • 1.1k
  • 1.7k

Portably, you can use:

lsof -ad 1 -p "$pid"

To see what's open on fd 1 (stdout) of process of id $pid.

If that's open to a pipe or another inter-process communication channel, on Linux, you can add the -E option to see what process is at the other end.

Portably, you can use:

lsof -ad 1 -p "$pid"

To see what's open on fd 1 (stdout) of process of id $pid.

If that's open to a pipe or another inter-process communication channel, you can add the -E option to see what process is at the other end.

Portably, you can use:

lsof -ad 1 -p "$pid"

To see what's open on fd 1 (stdout) of process of id $pid.

If that's open to a pipe or another inter-process communication channel, on Linux, you can add the -E option to see what process is at the other end.

Source Link
Stéphane Chazelas
  • 586.9k
  • 96
  • 1.1k
  • 1.7k

Portably, you can use:

lsof -ad 1 -p "$pid"

To see what's open on fd 1 (stdout) of process of id $pid.

If that's open to a pipe or another inter-process communication channel, you can add the -E option to see what process is at the other end.