]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsns: continue the executing even if opening a /proc/$pid fails
authorMasatake YAMATO <yamato@redhat.com>
Fri, 12 Apr 2024 18:16:32 +0000 (03:16 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 12 Apr 2024 18:51:27 +0000 (03:51 +0900)
commit8317645892082cc6a4fc21df9b1b13ce6e799644
treedb4032ea9d1ed1656e7769fb5c2706d7537189b6
parentd444d4b828657be67d87876ef5a07df4e29fba4f
lsns: continue the executing even if opening a /proc/$pid fails

In the original code, lsns printed nothing if it failed in opening the
last dntry in /proc/[0-9]* though lsns should work partially.

The original behavior caused the combination of the following two
test cases failed:

    $ tests/ts/lsns/filter & tests/ts/lsns/ioctl_ns &
    [1] 19178
    [2] 19179
    $          lsns: ownership and hierarchy        ...         \
    lsns: -Q, --filter option            ... FAILED
     FAILED

    [1]-  Done                    tests/ts/lsns/filter
    [2]+  Done                    tests/ts/lsns/ioctl_ns

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
sys-utils/lsns.c