summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-05-02 15:52:43 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-05-02 15:52:43 +0000
commit966eca4ad87436d03e380eef1ca55f49d0aeedb4 (patch)
tree5fb1ac19c1b33e2d7eed8f4add48e7125c521192 /Src/builtin.c
parent5db44fff033a0f1426928aa514b5dbe4dcc5482c (diff)
downloadzsh-966eca4ad87436d03e380eef1ca55f49d0aeedb4.tar.gz
zsh-966eca4ad87436d03e380eef1ca55f49d0aeedb4.zip
11036, 11063, 11077: Always write the "read -q" prompt to shout; eliminate
some redundant close() calls; relocate a misplaced redirection.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 7e536756a..508df9a4d 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3428,8 +3428,8 @@ bin_read(char *name, char **args, char *ops, int func)
*readpmpt && *readpmpt != '?'; readpmpt++);
if (*readpmpt++) {
if (keys || isatty(0)) {
- zputs(readpmpt, (haso ? shout : stderr));
- fflush(haso ? shout : stderr);
+ zputs(readpmpt, shout);
+ fflush(shout);
}
readpmpt[-1] = '\0';
}
@@ -3469,8 +3469,7 @@ bin_read(char *name, char **args, char *ops, int func)
else
settyinfo(&shttyinfo);
if (haso) {
- close(SHTTY);
- fclose(shout);
+ fclose(shout); /* close(SHTTY) */
shout = oshout;
SHTTY = -1;
}
@@ -3502,8 +3501,7 @@ bin_read(char *name, char **args, char *ops, int func)
/* dispose of result appropriately, etc. */
if (haso) {
- close(SHTTY);
- fclose(shout);
+ fclose(shout); /* close(SHTTY) */
shout = oshout;
SHTTY = -1;
}