Article View: gnu.bash.bug
Article #294Flurry of `file not found' messages.
From: Brian Fox
Date: Mon, 10 Jul 1989 21:34
Date: Mon, 10 Jul 1989 21:34
83 lines
2732 bytes
2732 bytes
Date: Mon, 10 Jul 89 16:44:39 -0400
From: romine@xagsun.epm.ornl.gov
Brian,
Sorry about the lack of information -- from reading the code,
I just assumed that the behavior I get was intentional. I built
bash-1.02 with exactly one change (prior to commenting out the line I
mentioned), and that was just the MAINTAINER definition. I'm running
on a SUN 3/50 with OS 4.0.1. (Note: I'm using gcc-1.35 with
-traditional to compile bash.)
I have the following environment (using bash as my default shell):
nolinks=1
Hey Chuck, thanks for sending me that stuff. Now I can see that when
`nolinks' is set the bug manifests itself. Here is the complete patch,
which also makes a static variable static:
----------------------------------------
File: ~/source/shell/builtins.c-patch
----------------------------------------
*** builtins.c.~6~ Sun Jul 9 08:56:31 1989
--- builtins.c Mon Jul 10 14:23:23 1989
***************
*** 776,781 ****
--- 776,785 ----
flag. */
int follow_symbolic_links = 1;
+ /* In order to keep track of the working directory, we have this static
+ variable hanging around. */
+ static char *the_current_working_directory = (char *)NULL;
+
cd_builtin (list)
WORD_LIST *list;
{
***************
*** 883,889 ****
change_to_directory (newdir)
char *newdir;
{
- extern char *the_current_working_directory;
char *get_working_directory (), *make_absolute ();
char *t;
--- 887,892 ----
***************
*** 920,938 ****
else
{
if (chdir (newdir) < 0)
! {
! file_error (newdir);
! return (0);
! }
else
! {
! return (1);
! }
}
}
-
-
- char *the_current_working_directory = (char *)NULL;
/* Return a consed string which is the current working directory.
FOR_WHOM is the name of the caller for error printing. */
--- 923,933 ----
else
{
if (chdir (newdir) < 0)
! return (0);
else
! return (1);
}
}
/* Return a consed string which is the current working directory.
FOR_WHOM is the name of the caller for error printing. */
----------------------------------------
Technical Details
Message-ID:
<8907102134.AA00219@aurel.caltech.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfoxReferences:
<8907102044.AA11531@xagsun.epm.ornl.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox From: bfox@AUREL.CALTECH.EDU (Brian Fox) Newsgroups: gnu.bash.bug Subject: Flurry of `file not found' messages. Message-ID: <8907102134.AA00219@aurel.caltech.edu> Date: 10 Jul 89 21:34:16 GMT References: <8907102044.AA11531@xagsun.epm.ornl.gov> Sender: daemon@tut.cis.ohio-state.edu Reply-To: bfox@aurel.caltech.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 83