Fix umovestr of unmapped page for UnixWare

This commit is contained in:
John Hughes 2001-10-16 10:20:22 +00:00
parent 7b3346be42
commit 9cecf7f8d6
2 changed files with 6 additions and 1 deletions

View File

@ -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

2
util.c
View File

@ -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;