Patch from Denis Vlasenko to add xstat() and use it.

This commit is contained in:
Rob Landley 2006-03-13 15:45:16 +00:00
parent 965030e35a
commit c5b1d4d6b1
12 changed files with 26 additions and 25 deletions

View file

@ -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)