diff options
| author | Paul Eggert | 2019-06-20 00:32:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-06-20 00:41:13 -0700 |
| commit | 2079e40a3cffbfacc79725c8788d56d05f232222 (patch) | |
| tree | bd5afee367524c19ca3a98730147ab407e603c01 /src | |
| parent | 4e8083ec81106eedbecb12799823044dbd05bc7e (diff) | |
| download | emacs-2079e40a3cffbfacc79725c8788d56d05f232222.tar.gz emacs-2079e40a3cffbfacc79725c8788d56d05f232222.zip | |
Line-buffer stderr
* src/sysdep.c (init_standard_fds) [!DOS_NT]:
Use setvbuf to ensure stderr is line-buffered.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index bc88e70dcb4..3396764d5dc 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -242,6 +242,12 @@ init_standard_fds (void) | |||
| 242 | force_open (STDIN_FILENO, O_WRONLY); | 242 | force_open (STDIN_FILENO, O_WRONLY); |
| 243 | force_open (STDOUT_FILENO, O_RDONLY); | 243 | force_open (STDOUT_FILENO, O_RDONLY); |
| 244 | force_open (STDERR_FILENO, O_RDONLY); | 244 | force_open (STDERR_FILENO, O_RDONLY); |
| 245 | |||
| 246 | /* Line-buffer stderr. However, leave stderr unbuffered on | ||
| 247 | MS-Windows, where setvbuf treats _IOLBF like _IOFBF. */ | ||
| 248 | #ifndef DOS_NT | ||
| 249 | setvbuf (stderr, NULL, _IOLBF, 0); | ||
| 250 | #endif | ||
| 245 | } | 251 | } |
| 246 | 252 | ||
| 247 | /* Return the current working directory. The result should be freed | 253 | /* Return the current working directory. The result should be freed |