about summary refs log tree commit diff
path: root/Src/Modules/zpty.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-11-11 19:50:27 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-11-11 19:50:27 +0000
commitc292a3ae50bd0605b015f80266418e391c3c10fe (patch)
tree8f2baf5a9e1cb7a9615190025d9825ed9824f952 /Src/Modules/zpty.c
parent89d480f57d59a794d8c2e04fc5270bed13b7a28a (diff)
downloadzsh-c292a3ae50bd0605b015f80266418e391c3c10fe.tar.gz
zsh-c292a3ae50bd0605b015f80266418e391c3c10fe.tar.xz
zsh-c292a3ae50bd0605b015f80266418e391c3c10fe.zip
Sven: 13108: Handle traps synchronously
pws: 13109, 13111: clear up zle display when output produced in trap.
Diffstat (limited to 'Src/Modules/zpty.c')
-rw-r--r--Src/Modules/zpty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index d25c3a865..e76411a8b 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -536,7 +536,7 @@ ptywritestr(Ptycmd cmd, char *s, int len)
 
     for (; !errflag && !breaks && !retflag && !contflag && len;
 	 len -= written, s += written) {
-	if ((written = write(cmd->fd, s, len)) < 0 && cmd->nblock &&
+	if ((written = ztrapwrite(cmd->fd, s, len)) < 0 && cmd->nblock &&
 #ifdef EWOULDBLOCK
 	    errno == EWOULDBLOCK
 #else
@@ -578,7 +578,7 @@ ptywrite(Ptycmd cmd, char **args, int nonl)
 	int n;
 	char buf[BUFSIZ];
 
-	while ((n = read(0, buf, BUFSIZ)) > 0)
+	while ((n = ztrapread(0, buf, BUFSIZ)) > 0)
 	    if (ptywritestr(cmd, buf, n))
 		return 1;
     }