summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-09-27 13:53:37 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2012-09-27 13:53:37 +0200
commit4411a0ce304812ea2f4e5c33815f7148981af195 (patch)
tree398a38c6df9d77ff98b749e64c8ee50846d4f69b /util.c
parent978fbc901c4fe260caaa5881e54bd9cb54022101 (diff)
downloadstrace-4411a0ce304812ea2f4e5c33815f7148981af195.tar.gz
strace-4411a0ce304812ea2f4e5c33815f7148981af195.tar.bz2
strace-4411a0ce304812ea2f4e5c33815f7148981af195.tar.xz
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>
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 3975f49..9ca49b2 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;