Skip to content

Commit

Permalink
get_cmdline: don't error out on empty cmdline
Browse files Browse the repository at this point in the history
This can happen with a zombie main thread.
  • Loading branch information
rfjakob committed Mar 20, 2024
1 parent ff573d3 commit d6185b6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions meminfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@ int get_cmdline(int pid, char* out, size_t outlen)
return -fread_errno;
}
fclose(f);
if (n < 1) {
return -ENODATA;
}
/* replace null character with space */
for (size_t i = 0; i < n; i++) {
if (out[i] == '\0') {
Expand Down

0 comments on commit d6185b6

Please sign in to comment.