Skip to content

Use /proc/self/task or /proc/self/status when /proc/self/stat returns 0 #15

@ptrcnull

Description

@ptrcnull

( follow-up to #3 )

in some weird cases, such as running qemu-user ( still debugging this issue ), /proc/self/stat returns mostly empty values, while /proc/self/task and /proc/self/status have the correct values:

$ cat /proc/self/stat
18477 (cat) R 16603 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21552080 0 0 0 0 0 70368752569616 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
$ cat /proc/self/status | grep Thread
Threads:	2
$ ls /proc/self/task
18505  18507
$ 

it would be nice to have a fallback to those, in case they have correct values and /proc/self/stat doesn't

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions