From: Denys Vlasenko Date: Thu, 27 Sep 2012 11:53:37 +0000 (+0200) Subject: process_vm_readv may return ESRCH if tracee was killed, don't complain X-Git-Tag: v4.8~216 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4411a0ce304812ea2f4e5c33815f7148981af195;p=strace process_vm_readv may return ESRCH if tracee was killed, don't complain Discovered by running test/sigkill_rain under strace. * util.c (umoven): Do not emit error message if process_vm_readv fails with ESRCH. (umovestr): LikeWise. Signed-off-by: Denys Vlasenko --- diff --git a/util.c b/util.c index 3975f492..9ca49b27 100644 --- a/util.c +++ b/util.c @@ -789,7 +789,7 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr) if (r < 0) { if (errno == ENOSYS) process_vm_readv_not_supported = 1; - else if (errno != EINVAL) /* EINVAL is seen if process is gone */ + else if (errno != EINVAL && errno != ESRCH) /* EINVAL is seen if process is gone */ /* strange... */ perror("process_vm_readv"); goto vm_readv_didnt_work; @@ -899,7 +899,7 @@ umovestr(struct tcb *tcp, long addr, int len, char *laddr) if (r < 0) { if (errno == ENOSYS) process_vm_readv_not_supported = 1; - else if (errno != EINVAL) /* EINVAL is seen if process is gone */ + else if (errno != EINVAL && errno != ESRCH) /* EINVAL is seen if process is gone */ /* strange... */ perror("process_vm_readv"); goto vm_readv_didnt_work;