aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorwkj <devnull@localhost>2004-08-02 15:21:38 +0000
committerwkj <devnull@localhost>2004-08-02 15:21:38 +0000
commit8773b4b2383644cdbfed598bd9596921233b9e62 (patch)
tree24933b055ceef8b999daeb343789ad61f66e5123 /src/cmd
parenta87638642c99d88a3543e0cd5864c9e54133fbee (diff)
downloadplan9port-8773b4b2383644cdbfed598bd9596921233b9e62.tar.gz
plan9port-8773b4b2383644cdbfed598bd9596921233b9e62.tar.bz2
plan9port-8773b4b2383644cdbfed598bd9596921233b9e62.zip
Try to be more clever about re-enabling terminal echo.
From Axel Belinfante.
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/9term/9term.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
index 7efce4ad..12d4be03 100644
--- a/src/cmd/9term/9term.c
+++ b/src/cmd/9term/9term.c
@@ -1021,7 +1021,8 @@ consread(void)
s = setecho(sfd, 0);
if(write(rcfd, buf, n) < 0)
exits(0);
- setecho(sfd, s);
+ if(s)
+ setecho(sfd, s);
}
}