diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2009-12-16 18:39:06 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2009-12-16 18:39:06 +0000 |
commit | 693fd5b56e51de2910a5681533033b9530650270 (patch) | |
tree | 652a4cdfda9874c0eac0ef801a8d266528dd6af1 /Src/Modules/zpty.c | |
parent | 74d17bc282cb7e9e0b0d73c87aff09ecf256dda7 (diff) | |
download | zsh-693fd5b56e51de2910a5681533033b9530650270.tar.gz zsh-693fd5b56e51de2910a5681533033b9530650270.tar.xz zsh-693fd5b56e51de2910a5681533033b9530650270.zip |
Check the return value of all pipe(), read(), and write() calls.
Gets rid of all the remaining "ignoring return value" compiler warnings, and makes some read/write operations safer by ensuring that an EINTR is handled.
Diffstat (limited to 'Src/Modules/zpty.c')
-rw-r--r-- | Src/Modules/zpty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c index 16bec2bc9..f25d442b2 100644 --- a/Src/Modules/zpty.c +++ b/Src/Modules/zpty.c @@ -586,7 +586,7 @@ ptyread(char *nam, Ptycmd cmd, char **args, int noblock, int mustmatch) seen = 1; if (++used == blen) { if (!*args) { - write(1, buf, used); + write_loop(1, buf, used); used = 0; } else { buf = hrealloc(buf, blen, blen << 1); @@ -632,7 +632,7 @@ ptyread(char *nam, Ptycmd cmd, char **args, int noblock, int mustmatch) if (*args) setsparam(*args, ztrdup(metafy(buf, used, META_HREALLOC))); else if (used) - write(1, buf, used); + write_loop(1, buf, used); if (seen && (!prog || matchok || !mustmatch)) return 0; |