]> granicus.if.org Git - procps-ng/commit
pmap: print process even if smaps unreadable
authorCraig Small <csmall@enc.com.au>
Sat, 24 Jan 2015 07:53:29 +0000 (18:53 +1100)
committerCraig Small <csmall@enc.com.au>
Sat, 24 Jan 2015 07:53:29 +0000 (18:53 +1100)
commit92071e963e6ff50f0e221dde286f3229267b2ff9
treee4409c3109c44e23abf9cbb64aaf139fdb7967d5
parent96c524990b1ec3ceeac249360b7654a8988f5912
pmap: print process even if smaps unreadable

pmap would previously print the process name if
/proc/PID/smaps could be opened, even if subsequent
reads failed.  This actually occurs with other users
PIDs.

Kernel 3.18rc1 introduced a change where the file could
not been opened, meaning pmap -X 1 previously showed
the process name and nothing else but NOW shows nothing
make check failed because of this.

This change prints the process name even before trying to open
the file, returning it to previous behaviour.
Thanks to Vincent Bernat for some analysis.

References:
  https://bugs.debian.org/775624
  https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=29a40ace841cba9b661711f042d1821cdc4ad47c

Signed-off-by: Craig Small <csmall@enc.com.au>
NEWS
pmap.c