Skip to content

Commit

Permalink
List only FDs 0, 1 and 2 for each process
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Jul 22, 2017
1 parent a73445c commit db8542a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions px/px_processinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,12 @@ def print_fds(process, processes):

print("")
print("File descriptors:")
# FIXME: Do we want CWD in this list?
print(" stdin : " + ipc_map.fds[0])
print(" stdout: " + ipc_map.fds[1])
print(" stderr: " + ipc_map.fds[2])
for fd in sorted(ipc_map.fds.keys()):
if fd <= 2:
# Already dealt with, see right before this loop
continue
print("{:>8}: {}".format(fd, ipc_map.fds[fd]))
# Note that we used to list all FDs here, but some processes (like Chrome)
# has silly amounts, making the px output unreadable. Users should consult
# lsof directly for the full list.

print("")
print("Network connections:")
Expand Down

0 comments on commit db8542a

Please sign in to comment.