Fix write()'s sigpipe case (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 May 2016 21:00:59 +0000 (17:00 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 May 2016 21:00:59 +0000 (17:00 -0400)
commite7f86fd2159f822852d230054aba5e637d268b88
tree9debfefcba342ca1675139666709f7724bb95644
parent842b684f2a64bab3c323b89d2db619cf4933bb0b
Fix write()'s sigpipe case (XCC)

We were checking errno for every non-zero return, instead of every negative
return.  It's possible that the kernel spuriously sets errno but doesn't
return -1, in which case the user should not look at errno.  Likewise, an
application could have set errno = EPIPE.

And thanks to mtaufen for spotting the typo in read.c.

Rebuild glibc, but it's not urgent.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/read.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/write.c