Skip to content

head is struggling to read files from /proc #5703

@sylvestre

Description

@sylvestre

The following will work:

$ cp /proc/version copy              
$  ./target/debug/coreutils head -c -1 copy 
Linux version 6.5.0-4-amd64 (debian-kernel@lists.debian.org) (gcc-13 (Debian 13.2.0-6) 13.2.0, GNU ld (GNU Binutils for Debian) 2.41) #1 SMP PREEMPT_DYNAMIC Debian 6.5.10-1 (2023-11-03)

while the following is failing:

$ ./target/debug/coreutils head -c -1 /proc/version

with GNU:

$ /usr/bin/head -c -1 /proc/version
Linux version 6.5.0-4-amd64 (debian-kernel@lists.debian.org) (gcc-13 (Debian 13.2.0-6) 13.2.0, GNU ld (GNU Binutils for Debian) 2.41) #1 SMP PREEMPT_DYNAMIC Debian 6.5.10-1 (2023-11-03)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions