]> granicus.if.org Git - strace/commitdiff
process_vm_readv gets EINVAL if process is gone (SIGKILLed). Don't complain.
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 28 Jan 2012 01:49:48 +0000 (02:49 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 28 Jan 2012 01:49:48 +0000 (02:49 +0100)
* util.c (umoven): Don't complain on EINVAL from process_vm_readv.
(umovestr): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util.c

diff --git a/util.c b/util.c
index 85207cdf52088ba87feb952c7fb8a48b00f30158..73c09ca9966bc5732d854f86812088d2dbe1cd89 100644 (file)
--- a/util.c
+++ b/util.c
@@ -834,7 +834,8 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr)
                if (r < 0) {
                        if (errno == ENOSYS)
                                process_vm_readv_not_supported = 1;
-                       else /* strange... */
+                       else if (errno != EINVAL) /* EINVAL is seen if process is gone */
+                               /* strange... */
                                perror("process_vm_readv");
                        goto vm_readv_didnt_work;
                }
@@ -1015,7 +1016,8 @@ umovestr(struct tcb *tcp, long addr, int len, char *laddr)
                        if (r < 0) {
                                if (errno == ENOSYS)
                                        process_vm_readv_not_supported = 1;
-                               else /* strange... */
+                               else if (errno != EINVAL) /* EINVAL is seen if process is gone */
+                                       /* strange... */
                                        perror("process_vm_readv");
                                goto vm_readv_didnt_work;
                        }