delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/05/05:32:59

From: cgf AT cygnus DOT com (Christopher G. Faylor)
Subject: Re: B19.1 Long pause occurs randomly in bash
5 Sep 1998 05:32:59 GMT :
Message-ID: <6sqieb$f69$1@cronkite.cygnus.com>
References: <35EDF1FA DOT D6CD6DA2 DOT cygnus DOT gnu-win32 AT auss DOT sop DOT dec DOT com>
X-Newsreader: trn 4.0-test63 (15 March 1998)

In article <35EDF1FA DOT D6CD6DA2 DOT cygnus DOT gnu-win32 AT auss DOT sop DOT dec DOT com>,
Jim Clark <clarkj AT auss DOT sop DOT dec DOT com> wrote:
>From the FAQ for 19.1:
>
>Long pause occurs randomly in bash
>==================================
>
>   It has been reported that bash will hang for several seconds upon
>occasion.  We are looking into this problem.  It does not seem to occur
>when bash is started under a command prompt.  Reportedly, if you
>specify the 'Start in' directory in the shortcut, the problem goes away.
>
>
>
>Observation:
>
>If I set the 'Start in' directory in the shortcut for bash to either
>"C:\" or "/", I will get long pauses (not so randomly) in bash.
>If I set the 'Start in' directory in the shortcut properties to any
>other directory (eg, "/home"), the problem seems to go away.

It's a bug in bash.  If you don't have a HOME environment variable set
or if you don't have a /etc/passwd file, your HOME will be assumed to be
the current directory ('/').  Bash prepends the HOME path to /.bashrc,
making //.bashrc.  Windows interprets that as a machine name which it
attempts to resolve, hence the delay.  Bash behaves similarly when
trying to find any mail file.  It constructs something like //username
and attempts to stat it at MAIL_CHECK intervals.

The solution is to rebuild bash with the patches I posted several days
ago.  Some workarounds are:  1) set the HOME environment variable, 2)
set up a valid /etc/passwd file, 3) start in some directory besides the
root, or 4) unset MAILCHECK.
-- 
cgf AT cygnus DOT com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019