Skip to content

Commit

Permalink
numastat: when reading no-exist pid, return EXIT_FAILURE
Browse files Browse the repository at this point in the history
This ease the result query by $?

Signed-off-by: Pingfan Liu <piliu@redhat.com>
  • Loading branch information
Pingfan Liu authored and andikleen committed May 21, 2019
1 parent ebec09d commit c8b1967
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions numastat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ void show_process_info() {
if (ferror(fs)) {
sprintf(buf, "Can't read /proc/%d/numa_maps", pid);
perror(buf);
exit(EXIT_FAILURE);
}
fclose(fs);
// If showing individual tables, or we just added the last total line,
Expand Down

0 comments on commit c8b1967

Please sign in to comment.