Line-buffer stderr
* src/sysdep.c (init_standard_fds) [!DOS_NT]: Use setvbuf to ensure stderr is line-buffered.
This commit is contained in:
parent
4e8083ec81
commit
2079e40a3c
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue