Subject: Re: bash "pregnant pauses" revisited (B19 on NT 4.0)
From: [email-masked] (Arndt Schoenewald)

18 Aug 1998 23:23:47 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: "Lassi A. Tuura" <[email-masked]>
Cc: Ulrich Lauther <[email-masked]>,
        Earnie Boyd <[email-masked]>, Matthias Morche <[email-masked]>,
        Cygwin32 Maillist <[email-masked]>

On Mon, Aug 17, 1998 at 09:08:51AM +0200, Lassi A. Tuura wrote:

> I do not know if this helps, but shell does try to check your mailbox
> every once in a while.  You can adjust the interval, including disabling
> the whole feature.  Variables that matter are $MAIL and $MAILCHECK.  The
> former tells the path to your mailbox and the latter sets the interval
> in seconds.  Setting MAILCHECK=0 disables checking.  I believe there
> were reports that indicated that this setting made the delays go away
> for some people.

Yes, it was the MAILCHECK. Thanks, Lassi (and many thanks also to Ulrich
Lauther and Earnie Boyd who suggested the same).

The manpage for bash version 2.01.1 says:

    MAILCHECK
	Specifies how often (in seconds) bash checks for mail. The
	default is 60 seconds. When it is time to check for mail, the
	shell does so before displaying the primary prompt. If this
	variable is unset, the shell disables mail checking.

I didn't think of this as I have neither the MAIL nor the MAILPATH
variable set, but in fact the bash manpage says about MAILPATH:

    MAILPATH
	A colon-separated list of file names to be checked for mail.
	[...] Bash supplies a default value for this variable, but
	the location of the user mail files that it uses is system
	dependent (e.g., /usr/spool/mail/$USER).

I don't know what the default mail path for the bash.exe shipped with
B19 is (echo $MAILPATH or $MAIL doesn't print anything), but I took a
hex editor to look into the binary and found an instance of the string
"unknown" not far from occurances of MAIL and MAILPATH. I patched the
string from "unknown" to "no-idea", and guess what, the system started
to query my name server for "no-idea". Gotcha.

So, in order to summarize, there are two possibilities to get rid of
the "pregnant pauses" syndrome:

  - Use the shell command `unset MAILCHECK' to disable bash's mail
    checking feature, which was causing this in the first place.
    (Attention: setting MAILCHECK to zero or to the empty string
    or to some garbage will *not* do, the variable must really be
    unset or the default behaviour applies!)

  - Create mounts for each drive letter X: to /X.
    For me, `mount -b D: /D' was all I needed to make the delays
    go away (D: is the system partition of my NT installation).

I have no idea why (2) works, too, but it does. I guess one can find
the explanation in the bash source code which I don't have handy right
now. Maybe there are even configuration options to bash that can be
used to build an executable which defaults to do no mail checks, and
this would probably be the more natural default for bash on Windows as
opposed to UNIX where every machine traditionally has its own mail
system (hint to Cygnus for the next release!).

Thanks again to everybody involved,
Arndt

-- 
Arndt Schoenewald ([email-masked])
IT Technology & Solutions Integrator
Ostenhellweg 31, 44135 Dortmund, Germany
Tel: +49 231 556075
Fax: +49 231 556049
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".