Skip to content

df: Different behavior and exit code under masked /proc (tests/df/no-mtab-status.sh) #9760

@oech3

Description

@oech3
$ unshare -rm bash -c "mount -t tmpfs tmpfs /proc && gnu-df ." ; echo $?
df: Warning: cannot read table of mounted file systems: No such file or directory
Filesystem     1K-blocks  Used Available Use% Mounted on
-                1970584 98352   1872232   5% /tmp
0
$ unshare -rm bash -c "mount -t tmpfs tmpfs /proc && uu-df ." ; echo $?
df: cannot read table of mounted file systems: No such file or directory
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions