diff options
Diffstat (limited to 'Src')
-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 fca0cc172..d119658c3 100644 --- a/Src/Modules/zpty.c +++ b/Src/Modules/zpty.c @@ -510,14 +510,14 @@ checkptycmd(Ptycmd cmd) if (cmd->read != -1 || cmd->fin) return; - if ((r = read(cmd->fd, &c, 1)) < 0) { + if ((r = read(cmd->fd, &c, 1)) <= 0) { if (kill(cmd->pid, 0) < 0) { cmd->fin = 1; zclose(cmd->fd); } return; } - if (r) cmd->read = (int) c; + cmd->read = (int) c; } static int |