rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 8d8059fc729b5152b4b168944ce9399cc63cbf38
parent 02d9475165e3b52bce47b0699fb8a9f67da4f0f4
Author: tgoodwin <tgoodwin>
Date:   Thu, 12 Feb 1998 13:03:32 +0000

check that it's a file descriptor we've got before seeing if it' stdin

Diffstat:
Minput.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/input.c b/input.c @@ -280,7 +280,7 @@ extern Node *doit(bool execit) { } if ((s = varlookup("prompt")) != NULL) { #if READLINE - if (istack->fd == 0) + if (istack->t == iFd && istack->fd == 0) prompt = s->w; else #endif @@ -367,11 +367,10 @@ extern void print_prompt2() { lineno++; if (interactive) { #if READLINE - if (istack->fd == 0) + if (istack->t == iFd && istack->fd == 0) prompt = prompt2; else #endif fprint(2, "%s", prompt2); } } -