sebuf on stdin was called if any std stream was a tty. Bad. (obs from Ashwin Srinivasan).
This commit is contained in:
parent
b5ad71c9c1
commit
8ecac6c2f9
@ -473,10 +473,13 @@ InitStdStream (int sno, SMALLUNSGN flags, YP_File file)
|
|||||||
s->status |= Tty_Stream_f|Promptable_Stream_f;
|
s->status |= Tty_Stream_f|Promptable_Stream_f;
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SETBUF
|
#if HAVE_SETBUF
|
||||||
if (s->status & Tty_Stream_f)
|
if (s->status & Tty_Stream_f &&
|
||||||
|
sno == 0) {
|
||||||
/* make sure input is unbuffered if it comes from stdin, this
|
/* make sure input is unbuffered if it comes from stdin, this
|
||||||
makes life simpler for interrupt handling */
|
makes life simpler for interrupt handling */
|
||||||
YP_setbuf (stdin, NULL);
|
YP_setbuf (stdin, NULL);
|
||||||
|
// fprintf(stderr,"here I am\n");
|
||||||
|
}
|
||||||
#endif /* HAVE_SETBUF */
|
#endif /* HAVE_SETBUF */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user