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 <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2012-09-27 13:53:37 +02:00
parent 978fbc901c
commit 4411a0ce30

4
util.c
View File

@ -789,7 +789,7 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr)
if (r < 0) { if (r < 0) {
if (errno == ENOSYS) if (errno == ENOSYS)
process_vm_readv_not_supported = 1; 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... */ /* strange... */
perror("process_vm_readv"); perror("process_vm_readv");
goto vm_readv_didnt_work; goto vm_readv_didnt_work;
@ -899,7 +899,7 @@ umovestr(struct tcb *tcp, long addr, int len, char *laddr)
if (r < 0) { if (r < 0) {
if (errno == ENOSYS) if (errno == ENOSYS)
process_vm_readv_not_supported = 1; 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... */ /* strange... */
perror("process_vm_readv"); perror("process_vm_readv");
goto vm_readv_didnt_work; goto vm_readv_didnt_work;