Commit 2079e40a authored by Paul Eggert's avatar Paul Eggert

Line-buffer stderr

* src/sysdep.c (init_standard_fds) [!DOS_NT]:
Use setvbuf to ensure stderr is line-buffered.
parent 4e8083ec
......@@ -242,6 +242,12 @@ init_standard_fds (void)
force_open (STDIN_FILENO, O_WRONLY);
force_open (STDOUT_FILENO, O_RDONLY);
force_open (STDERR_FILENO, O_RDONLY);
/* Line-buffer stderr. However, leave stderr unbuffered on
MS-Windows, where setvbuf treats _IOLBF like _IOFBF. */
#ifndef DOS_NT
setvbuf (stderr, NULL, _IOLBF, 0);
#endif
}
/* Return the current working directory. The result should be freed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment