]> granicus.if.org Git - strace/commitdiff
Fix umovestr of unmapped page for UnixWare
authorJohn Hughes <john@Calva.COM>
Tue, 16 Oct 2001 10:20:22 +0000 (10:20 +0000)
committerJohn Hughes <john@Calva.COM>
Tue, 16 Oct 2001 10:20:22 +0000 (10:20 +0000)
ChangeLog
util.c

index 7884935db8d7f8b287e44a56c24e7e43ecbb003b..67f16ac38e5d54bfb60d5bc4dc7b3e92798deeaa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-16  John Hughes  <john@Calva.COM>
+
+       * util.c (umovestr): UnixWare (svr4?) returns 0 when trying
+       to read unmapped page.  Make it possible to strace ksh.
+
 2001-10-03  David Mosberger  <davidm@hpl.hp.com>
 
        * process.c (internal_clone): Avoid race condition by clearing
diff --git a/util.c b/util.c
index 595b847d43789e7f6255c2dac02c365bf64a864e..c59d25a7e0ded63e239fddb0d6b381bc708999e7 100644 (file)
--- a/util.c
+++ b/util.c
@@ -711,7 +711,7 @@ char *laddr;
 
        while (left) {
                if (move > left) move = left;
-               if ((move = read(fd, laddr, move)) == -1)
+               if ((move = read(fd, laddr, move)) <= 0)
                        return left != len ? 0 : -1;
                if (memchr (laddr, 0, move)) break;
                left -= move;