Patch from Denis Vlasenko to add xstat() and use it.
This commit is contained in:
parent
965030e35a
commit
c5b1d4d6b1
12 changed files with 26 additions and 25 deletions
|
@ -53,8 +53,8 @@ pid_is_exec(pid_t pid, const char *name)
|
|||
char buf[32];
|
||||
struct stat sb, exec_stat;
|
||||
|
||||
if (name && stat(name, &exec_stat))
|
||||
bb_perror_msg_and_die("stat %s", name);
|
||||
if (name)
|
||||
xstat(name, &exec_stat);
|
||||
|
||||
sprintf(buf, "/proc/%d/exe", pid);
|
||||
if (stat(buf, &sb) != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue