Article View: gnu.bash.bug
Article #96Efficiency is important
From: Ray Moody
Date: Wed, 14 Jun 1989 05:59
Date: Wed, 14 Jun 1989 05:59
33 lines
1559 bytes
1559 bytes
Bash prints its prompts to stderr. Stderr is unbuffered. Thus,
bash makes one (expensive) write () system call for each character it
prints. This eats our poor VAX 11/750 alive.
Ray
-------------------------------------------------------------------------------
RCS file: RCS/shell.c,v
retrieving revision 0.99.1.2
diff -c -r0.99.1.2 shell.c
*** /tmp/,RCSt1023214 Wed Jun 14 00:54:32 1989
--- shell.c Wed Jun 14 00:54:01 1989
***************
*** 188,193
if (shell_initialized)
shell_reinitialize ();
/* Here's a hack. If the name of this shell is "sh", then don't do
any startup files; just try to be more like /bin/sh. */
{
--- 188,198 -----
if (shell_initialized)
shell_reinitialize ();
+ /* Added Wed Jun 14 00:53:21 EST 1989 by Ray Moody */
+ /* We call setlinebuf () so that the readline package does not use
+ one (expensive) write () system call for each character it prints. */
+ setlinebuf(stderr);
+
/* Here's a hack. If the name of this shell is "sh", then don't do
any startup files; just try to be more like /bin/sh. */
{
Technical Details
Message-ID:
<8906140559.AA23252@gibbs.physics.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!GIBBS.PHYSICS.PURDUE.EDU!rayShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!GIBBS.PHYSICS.PURDUE.EDU!ray From: ray@GIBBS.PHYSICS.PURDUE.EDU (Ray Moody) Newsgroups: gnu.bash.bug Subject: Efficiency is important Message-ID: <8906140559.AA23252@gibbs.physics.purdue.edu> Date: 14 Jun 89 05:59:41 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 33