forked from enlightenment/enlightenment
parent
568a676073
commit
be154b60c8
|
@ -890,7 +890,11 @@ _get_ppid(pid_t pid)
|
||||||
ERR("Can't open %s, maybee the process exited.", buf);
|
ERR("Can't open %s, maybee the process exited.", buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ((read(fd, buf, sizeof(buf))) < 4) return -1;
|
if ((read(fd, buf, sizeof(buf))) < 4)
|
||||||
|
{
|
||||||
|
close(fd);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
s = strrchr(buf, ')');
|
s = strrchr(buf, ')');
|
||||||
s += 3;
|
s += 3;
|
||||||
|
|
Loading…
Reference in New Issue