diff options
author | jilles <jilles@FreeBSD.org> | 2009-11-21 14:28:32 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-11-21 14:28:32 +0000 |
commit | f225be7d75ed32bd8b760dadf4febdd70444731c (patch) | |
tree | 577f16ed2214690de633f6521e07d52dcb58724d /bin/sh/histedit.c | |
parent | a85bade2b14950ef85d7eff28bbc53d11842b207 (diff) | |
download | FreeBSD-src-f225be7d75ed32bd8b760dadf4febdd70444731c.zip FreeBSD-src-f225be7d75ed32bd8b760dadf4febdd70444731c.tar.gz |
sh: Some changes to stderr flushing:
* increase buffer size from 100 to 256 bytes
* remove implied flush from out2str(), in particular this avoids unnecessary
flushing in the middle of a -x tracing line
* rename dprintf() to out2fmt_flush(), make it flush out2 and use this
function in various places where flushing is desired after an error
message
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r-- | bin/sh/histedit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 32b0448..0c2def8 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -92,7 +92,7 @@ histedit(void) if (hist != NULL) sethistsize(histsizeval()); else - out2str("sh: can't initialize history\n"); + out2fmt_flush("sh: can't initialize history\n"); } if (editing && !el && isatty(0)) { /* && isatty(2) ??? */ /* @@ -114,7 +114,7 @@ histedit(void) el_set(el, EL_PROMPT, getprompt); } else { bad: - out2str("sh: can't initialize editing\n"); + out2fmt_flush("sh: can't initialize editing\n"); } INTON; } else if (!editing && el) { @@ -336,6 +336,7 @@ histcmd(int argc, char **argv) if (sflg) { if (displayhist) { out2str(s); + flushout(out2); } evalstring(s, 0); if (displayhist && hist) { |