w(1) and whodo(1) should silently skip dirs it cannot open
As part of the fix for #12523, it would write out an warning to stderr if it couldn't open the directory for a particular process (/proc/nnnn) for reasons other than ENOENT -- assuming the only reason it couldn't be opened is if the process went away between reading the directory entry from /proc and attempting to open it. It turns out, zoned process will also trigger a failure and a spurious warning.
The pre-#12523 code just silently skipped any proc dirs it couldn't open, we should just restore that behavior.
Updated by Jason King 10 months ago
To test this, I build both existing and new versions of w and whodo. I then ran each in a global zone with several zones booted. Without the fix, you could see permission denied errors trying to open processes in the NGZ. With the fix, the warnings are no longer present.
I also ran the old and new versions of both utilities in a NGZ as well -- all versions worked (as expected).
Updated by Electric Monk 10 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 45de8795bcb0e4c49743f37edfdd2c89d5a7863b Author: Jason King <firstname.lastname@example.org> Date: 2020-05-01T23:13:18.000Z 12683 w(1) and whodo(1) should silently skip dirs it cannot open Reviewed by: Andy Fiddaman <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>