Repository navigation
Commit 58ef44d
nvx: name the stat fields that the Linux process start-time reader takes
parse_stat read the starttime of a /proc/<pid>/stat line with a bare
fields.get(19), whose value, field 22 less field 3 of proc_pid_stat(5),
only a comment gave, and the state with an unchecked fields[0], which
held only because the get(19) above it succeeded.
Name the state and starttime field numbers in proc_pid_stat(5), index
the fields with their difference, and read the state with
fields.first(), which returns the same malformed error. The index stays
19 and the state the first field, so every line yields the same values
or the same error as before.
The host::process Linux tests, which cover start_time_from_stat, pass
unchanged at b269fea and with this change, in WSL 2.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b269fea commit 58ef44d
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
74 | | - | |
| 81 | + | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | | - | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
0 commit comments