mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
* init.c (scm_init_standard_ports): Doc fix.
This commit is contained in:
parent
ec06dd30cf
commit
94754080e4
1 changed files with 13 additions and 2 deletions
|
@ -243,8 +243,19 @@ check_config ()
|
||||||
static void
|
static void
|
||||||
scm_init_standard_ports ()
|
scm_init_standard_ports ()
|
||||||
{
|
{
|
||||||
/* I'm not sure why this should be unbuffered when coming from a
|
/* From the SCSH manual:
|
||||||
tty; isn't line buffering more common? */
|
|
||||||
|
It can be useful to turn I/O buffering off in some cases, for
|
||||||
|
example when an I/O stream is to be shared by multiple
|
||||||
|
subprocesses. For this reason, scsh allocates an unbuffered port
|
||||||
|
for file descriptor 0 at start-up time.
|
||||||
|
|
||||||
|
Because shells frequently share stdin with subprocesses, if the
|
||||||
|
shell does buffered reads, it might ``steal'' input intended for
|
||||||
|
a subprocess. For this reason, all shells, including sh, csh,
|
||||||
|
and scsh, read stdin unbuffered. Applications that can tolerate
|
||||||
|
buffered input on stdin can reset \ex{(current-input-port)} to
|
||||||
|
block buffering for higher performance. */
|
||||||
scm_def_inp = scm_stdio_to_port (stdin,
|
scm_def_inp = scm_stdio_to_port (stdin,
|
||||||
(isatty (fileno (stdin)) ? "r0" : "r"),
|
(isatty (fileno (stdin)) ? "r0" : "r"),
|
||||||
"standard input");
|
"standard input");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue