diff options
author | chris.zn <chris.zn@antfin.com> | 2019-06-20 15:19:05 +0800 |
---|---|---|
committer | chris.zn <chris.zn@antfin.com> | 2019-06-24 15:49:53 +0800 |
commit | f957fb23cf68e72084c7b50569242a07997f96bc (patch) | |
tree | 65451f6c2c5c2c87a70d8638614071b971aa6cbc /test/syscalls/linux/madvise.cc | |
parent | 7e49515696f628a41ed63199570d25dfbe9d8848 (diff) |
Return ENOENT when reading /proc/{pid}/task of an exited process
There will be a deadloop when we use getdents to read /proc/{pid}/task
of an exited process
Like this:
Process A is running
Process B: open /proc/{pid of A}/task
Process A exits
Process B: getdents /proc/{pid of A}/task
Then, process B will fall into deadloop, and return "." and ".."
in loops and never ends.
This patch returns ENOENT when use getdents to read /proc/{pid}/task
if the process is just exited.
Signed-off-by: chris.zn <chris.zn@antfin.com>
Diffstat (limited to 'test/syscalls/linux/madvise.cc')
0 files changed, 0 insertions, 0 deletions