Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libpromises/process_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ static bool GetProcessStat(pid_t pid, ProcessStat *state)
return false;
}

assert (fd != -1 && "Unable to open /proc/<pid>/stat");
/* E.g. the process may have exited in the meantime */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't such a case be handled by one of the above errno checks? ENOENT or ENOTDIR, I guess?

Log(LOG_LEVEL_DEBUG, "Failed to open '%s' (open: %s)",
filename, GetErrorStr());
return false;
}

char stat[CF_BUFSIZE];
Expand Down
Loading