diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-27 13:53:37 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-27 13:53:37 +0200 |
commit | 4411a0ce304812ea2f4e5c33815f7148981af195 (patch) | |
tree | 398a38c6df9d77ff98b749e64c8ee50846d4f69b /util.c | |
parent | 978fbc901c4fe260caaa5881e54bd9cb54022101 (diff) | |
download | strace-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |