-/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2007 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
if (list)
{
builtin_error (_("too many arguments"));
+ top_level_cleanup ();
jump_to_top_level (DISCARD);
}
}
if (fatal)
throw_to_top_level ();
else
- jump_to_top_level (DISCARD);
+ {
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
}
no_args (list->next);
}
if (the_current_working_directory == 0)
{
+#if defined (GETCWD_BROKEN)
+ the_current_working_directory = getcwd (0, PATH_MAX);
+#else
the_current_working_directory = getcwd (0, 0);
+#endif
if (the_current_working_directory == 0)
{
fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),