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/input.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/input.c')
-rw-r--r-- | bin/sh/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/input.c b/bin/sh/input.c index f709b8c..3d8f90c 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -215,7 +215,7 @@ retry: if (flags >= 0 && flags & O_NONBLOCK) { flags &=~ O_NONBLOCK; if (fcntl(0, F_SETFL, flags) >= 0) { - out2str("sh: turning off NDELAY mode\n"); + out2fmt_flush("sh: turning off NDELAY mode\n"); goto retry; } } @@ -359,7 +359,7 @@ pushstring(char *s, int len, void *ap) struct strpush *sp; INTOFF; -/*dprintf("*** calling pushstring: %s, %d\n", s, len);*/ +/*out2fmt_flush("*** calling pushstring: %s, %d\n", s, len);*/ if (parsefile->strpush) { sp = ckmalloc(sizeof (struct strpush)); sp->prev = parsefile->strpush; @@ -386,7 +386,7 @@ popstring(void) parsenextc = sp->prevstring; parsenleft = sp->prevnleft; parselleft = sp->prevlleft; -/*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/ +/*out2fmt_flush("*** calling popstring: restoring to '%s'\n", parsenextc);*/ if (sp->ap) sp->ap->flag &= ~ALIASINUSE; parsefile->strpush = sp->prev; |