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/main.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/main.c')
-rw-r--r-- | bin/sh/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c index 85a6d20..f26e611 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -154,7 +154,7 @@ main(int argc, char *argv[]) setstackmark(&smark); procargs(argc, argv); if (getpwd() == NULL && iflag) - out2str("sh: cannot determine working directory\n"); + out2fmt_flush("sh: cannot determine working directory\n"); if (getpwd() != NULL) setvar ("PWD", getpwd(), VEXPORT); if (argv[0] && argv[0][0] == '-') { @@ -223,7 +223,7 @@ cmdloop(int top) if (!stoppedjobs()) { if (!Iflag) break; - out2str("\nUse \"exit\" to leave shell.\n"); + out2fmt_flush("\nUse \"exit\" to leave shell.\n"); } numeof++; } else if (n != NULL && nflag == 0) { |