summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
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;
}