commit bash-20150424 snapshot

This commit is contained in:
Chet Ramey
2015-05-15 11:04:28 -04:00
parent 85ec0778f9
commit 48abf0fdc9
23 changed files with 474 additions and 58 deletions
+71
View File
@@ -8342,3 +8342,74 @@ shell.c
---- ----
ulimit.def ulimit.def
- fix typo in limits[] declaration of `k' - fix typo in limits[] declaration of `k'
4/20
----
configure.ac
- add template definitions set by AC_USE_SYSTEM_EXTENSIONS from a report
from Andreas Schwab <schwab@linux-m68k.org>
variables.c
- FUNCTIONS_HASH_BUCKETS: constant used to size the hash tables used for
shell functions and the text of shell function definitions. Initially
set to 512, even though it's a really rare case that someone has more
than around 150 functions, even with bash-completion
4/21
----
shell.c
- main: malloc_set_register: change arg to 0 to disable keeping track of
allocations and frees in table; change to 1 for malloc debugging on
demand. Table is too small to keep effective track of allocations on
a modern system, need to use something like valgrind
4/22
----
shell.c
- main: move cmd_init() (initialize word desc and word list object caches)
after startup files are read so the cache doesn't get filled up with
semi-permanent storage for shell functions and variables
execute_cmd.c
- execute_function: use maybe_set_debug_trap in the same way as source
builtin change from 4/10 to allow functions to reset a DEBUG trap
when set -T not in effect. From a report by Peng Yu
<pengyu.ut@gmail.com>
4/23
----
execute_cmd.c
- execute_disk_command: don't overwrite value of subshell_environment
by assigning SUBSHELL_FORK; just OR in SUBSHELL_FORK so something
like SUBSHELL_ASYNC or SUBSHELL_PIPE is preserved
jobs.c
- wait_for: don't call give_terminal_to if running in a subshell
environment, not just if running_in_background is set; don't want
shell functions waiting for a process to complete in a pipeline to
give the terminal to the wrong process group. Part of fix for bug
reported by Valentin Bajrami <valentin.bajrami@gmail.com>
- make_child: child process should not try to give the terminal to the
pipeline_pgrp if running as part of a pipeline (SUBSHELL_PIPE in
subshell_environment); functions in execute_cmd.c don't set that
flag until after make_child returns and the child process is running.
Rest of fix for bug reported by Valentin Bajrami
<valentin.bajrami@gmail.com>
4/24
----
redir.c
- redirection_error: if the redirection involves {varname}, only use
`varname' in the error message if the error code is < 0 (one of the
internal redirection errors, like ambiguous or bad variable name);
otherwise the issue is probably with the filename and should be treated
as usual. Fixes problem reported by Dr. David Alan Gilbert
<dgilbert@redhat.com>
configure.ac,config.h.in
- sys/ioctl.h: add check in AC_CHECK_HEADERS macro, define HAVE_SYS_IOCTL_H
lib/readline/{rltty,terminal}.c
- sys/ioctl.h: include unconditionally for ioctl declaration, avoid issues
with `implicit declaration' warnings. Issue originally raised on gdb
list by Chen Gang <xili_gchen_5257@hotmail.com>
+15 -3
View File
@@ -21,6 +21,17 @@
#ifndef _CONFIG_H_ #ifndef _CONFIG_H_
#define _CONFIG_H_ #define _CONFIG_H_
/* Template settings for autoconf */
#undef __EXTENSIONS__
#undef _ALL_SOURCE
#undef _GNU_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_1_SOURCE
#undef _POSIX_PTHREAD_SEMANTICS
#undef _TANDEM_SOURCE
#undef _MINIX
/* Configuration feature settings controllable by autoconf. */ /* Configuration feature settings controllable by autoconf. */
/* Define JOB_CONTROL if your operating system supports /* Define JOB_CONTROL if your operating system supports
@@ -204,6 +215,7 @@
#undef HAVE_LONG_DOUBLE #undef HAVE_LONG_DOUBLE
#undef PROTOTYPES #undef PROTOTYPES
#undef __PROTOTYPES
#undef __CHAR_UNSIGNED__ #undef __CHAR_UNSIGNED__
@@ -994,6 +1006,9 @@
/* Define if you have the <sys/file.h> header file. */ /* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H #undef HAVE_SYS_FILE_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define if you have the <sys/ndir.h> header file. */ /* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H #undef HAVE_SYS_NDIR_H
@@ -1070,9 +1085,6 @@
/* Are we running the GNU C library, version 2.1 or later? */ /* Are we running the GNU C library, version 2.1 or later? */
#undef GLIBC21 #undef GLIBC21
/* Define if on MINIX. */
#undef _MINIX
/* Are we running SVR5 (UnixWare 7)? */ /* Are we running SVR5 (UnixWare 7)? */
#undef SVR5 #undef SVR5
Vendored
+2 -2
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.ac for Bash 4.4, version 4.068. # From configure.ac for Bash 4.4, version 4.069.
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for bash 4.4-devel. # Generated by GNU Autoconf 2.69 for bash 4.4-devel.
# #
@@ -9298,7 +9298,7 @@ fi
done done
for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h \ for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \
sys/resource.h sys/param.h sys/socket.h sys/stat.h \ sys/resource.h sys/param.h sys/socket.h sys/stat.h \
sys/time.h sys/times.h sys/types.h sys/wait.h sys/time.h sys/times.h sys/types.h sys/wait.h
do : do :
+2 -2
View File
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_REVISION([for Bash 4.4, version 4.068])dnl AC_REVISION([for Bash 4.4, version 4.069])dnl
define(bashvers, 4.4) define(bashvers, 4.4)
define(relstatus, devel) define(relstatus, devel)
@@ -716,7 +716,7 @@ AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \
regex.h syslog.h ulimit.h) regex.h syslog.h ulimit.h)
AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h \ AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \
sys/resource.h sys/param.h sys/socket.h sys/stat.h \ sys/resource.h sys/param.h sys/socket.h sys/stat.h \
sys/time.h sys/times.h sys/types.h sys/wait.h) sys/time.h sys/times.h sys/types.h sys/wait.h)
AC_CHECK_HEADERS(netinet/in.h arpa/inet.h) AC_CHECK_HEADERS(netinet/in.h arpa/inet.h)
+4 -3
View File
@@ -6948,7 +6948,8 @@ require \fB\-\-\fP to prevent this interpretation.
No effect; the command does nothing beyond expanding No effect; the command does nothing beyond expanding
.I arguments .I arguments
and performing any specified and performing any specified
redirections. A zero exit code is returned. redirections.
The return status is zero.
.TP .TP
\fB .\| \fP \fIfilename\fP [\fIarguments\fP] \fB .\| \fP \fIfilename\fP [\fIarguments\fP]
.PD 0 .PD 0
@@ -8816,8 +8817,8 @@ If no
are supplied, the line read is assigned to the variable are supplied, the line read is assigned to the variable
.SM .SM
.BR REPLY . .BR REPLY .
The return code is zero, unless end-of-file is encountered, \fBread\fP The exit status is zero, unless end-of-file is encountered, \fBread\fP
times out (in which case the return code is greater than 128), times out (in which case the status is greater than 128),
a variable assignment error (such as assigning to a readonly variable) occurs, a variable assignment error (such as assigning to a readonly variable) occurs,
or an invalid file descriptor is supplied as the argument to \fB\-u\fP. or an invalid file descriptor is supplied as the argument to \fB\-u\fP.
.RE .RE
+2 -2
View File
@@ -4358,8 +4358,8 @@ The backslash character @samp{\} may be used to remove any special
meaning for the next character read and for line continuation. meaning for the next character read and for line continuation.
If no names are supplied, the line read is assigned to the If no names are supplied, the line read is assigned to the
variable @env{REPLY}. variable @env{REPLY}.
The return code is zero, unless end-of-file is encountered, @code{read} The exit status is zero, unless end-of-file is encountered, @code{read}
times out (in which case the return code is greater than 128), times out (in which case the status is greater than 128),
a variable assignment error (such as assigning to a readonly variable) occurs, a variable assignment error (such as assigning to a readonly variable) occurs,
or an invalid file descriptor is supplied as the argument to @option{-u}. or an invalid file descriptor is supplied as the argument to @option{-u}.
+2 -2
View File
@@ -4588,7 +4588,7 @@ execute_function (var, words, flags, fds_to_close, async, subshell)
{ {
debug_trap = savestring (debug_trap); debug_trap = savestring (debug_trap);
add_unwind_protect (xfree, debug_trap); add_unwind_protect (xfree, debug_trap);
add_unwind_protect (set_debug_trap, debug_trap); add_unwind_protect (maybe_set_debug_trap, debug_trap);
} }
restore_default_signal (DEBUG_TRAP); restore_default_signal (DEBUG_TRAP);
} }
@@ -5115,7 +5115,7 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
if (async) if (async)
interactive = 0; interactive = 0;
subshell_environment = SUBSHELL_FORK; /* XXX */ subshell_environment |= SUBSHELL_FORK; /* XXX - was just = */
if (redirects && (do_redirections (redirects, RX_ACTIVE) != 0)) if (redirects && (do_redirections (redirects, RX_ACTIVE) != 0))
{ {
+3 -3
View File
@@ -1871,7 +1871,7 @@ make_child (command, async_p)
In this case, we don't want to give the terminal to the In this case, we don't want to give the terminal to the
shell's process group (we could be in the middle of a shell's process group (we could be in the middle of a
pipeline, for example). */ pipeline, for example). */
if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0) && running_in_background == 0) if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&(SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0) && running_in_background == 0)
give_terminal_to (pipeline_pgrp, 0); give_terminal_to (pipeline_pgrp, 0);
#if defined (PGRP_PIPE) #if defined (PGRP_PIPE)
@@ -2658,8 +2658,8 @@ itrace("wait_for: blocking wait for %d returns %d child = %p", (int)pid, r, chil
if (job == NO_JOB) if (job == NO_JOB)
itrace("wait_for: job == NO_JOB, giving the terminal to shell_pgrp (%ld)", (long)shell_pgrp); itrace("wait_for: job == NO_JOB, giving the terminal to shell_pgrp (%ld)", (long)shell_pgrp);
#endif #endif
/* Don't modify terminal pgrp if we are running in the background */ /* Don't modify terminal pgrp if we are running in background or a subshell */
if (running_in_background == 0) if (running_in_background == 0 && subshell_environment == 0)
give_terminal_to (shell_pgrp, 0); give_terminal_to (shell_pgrp, 0);
} }
+310
View File
@@ -0,0 +1,310 @@
total 3772
drwxr-xr-x 100 root root 12288 Apr 21 04:13 ./
drwxr-xr-x 29 root root 4096 Apr 21 03:02 ../
-rw-r--r-- 1 root root 15288 Jan 15 2008 a2ps.cfg
-rw-r--r-- 1 root root 2562 Jan 15 2008 a2ps-site.cfg
drwxr-xr-x 4 root root 4096 Oct 5 2011 acpi/
-rw-r--r-- 1 root root 46 Apr 21 03:00 adjtime
drwxr-xr-x 4 root root 4096 May 17 2010 alchemist/
-rw-r--r-- 1 root root 1601 May 25 2010 aliases
-rw-r--r-- 1 root root 12288 Apr 21 03:03 aliases.db
-rw-r--r-- 1 root root 1512 Apr 25 2005 aliases.redhat
drwxr-xr-x 4 root root 4096 May 17 2010 alsa/
drwxr-xr-x 2 root root 4096 Apr 21 01:01 alternatives/
-rw-r--r-- 1 root root 298 Dec 18 2006 anacrontab
-rw------- 1 root root 1 Oct 3 2014 at.deny
drwxr-x--- 3 root root 4096 May 31 2012 audisp/
drwxr-x--- 2 root root 4096 May 31 2012 audit/
-rw------- 1 root root 3902 Jul 11 2014 autofs_ldap_auth.conf
-rw-r--r-- 1 root root 681 May 25 2010 auto.master
-rw-r--r-- 1 root root 717 Mar 16 2010 auto.master.redhat
-rw-r--r-- 1 root root 581 Jul 11 2014 auto.misc
-rwxr-xr-x 1 root root 1292 Jul 11 2014 auto.net*
-rwxr-xr-x 1 root root 742 Jul 11 2014 auto.smb*
drwxr-xr-x 4 root root 4096 May 31 2011 avahi/
lrwxrwxrwx 1 root root 21 Feb 10 2014 avamar -> /usr/local/avamar/etc/
-rw-r--r-- 1 root root 1872 Dec 5 2011 bashrc
drwxr-xr-x 2 root root 4096 Apr 21 03:03 blkid/
drwxr-xr-x 2 root root 4096 May 31 2011 bonobo-activation/
-rw-r--r-- 1 root root 977 Oct 3 2008 cdrecord.conf
-rw-r--r-- 1 root root 306 May 25 2010 CHANGELOG.txt
drwx------ 2 root root 4096 Oct 14 2014 cron.d/
drwxr-xr-x 2 root root 4096 Feb 17 01:02 cron.daily/
-rw-r--r-- 1 root root 0 May 17 2010 cron.deny
drwxr-xr-x 2 root root 4096 Aug 29 2012 cron.hourly/
drwxr-xr-x 2 root root 4096 Aug 29 2012 cron.monthly/
-rw-r--r-- 1 root root 255 Aug 29 2012 crontab
drwxr-xr-x 2 root root 4096 Feb 27 2013 cron.weekly/
-rw-r--r-- 1 root root 1044 Dec 5 2011 csh.cshrc
-rw-r--r-- 1 root root 823 Dec 5 2011 csh.login
drwxr-xr-x 5 root lp 4096 Feb 17 01:02 cups/
drwxr-xr-x 4 root root 4096 Oct 22 2013 dbus-1/
drwxr-xr-x 2 root root 4096 Jan 28 15:45 default/
drwxr-xr-x 2 root root 4096 Oct 22 2013 depmod.d/
drwxr-xr-x 3 root root 4096 Jun 6 2014 dev.d/
-rw-r--r-- 1 root root 2892 Jan 7 22:12 dhcpd.conf
-rw-r--r-- 1 root root 2751 Feb 7 2013 dhcpd.conf~
-rw-r--r-- 1 root root 2822 Oct 15 2014 dhcpd.conf.ACT
-rw-r--r-- 1 root root 2822 Oct 15 2014 dhcpd.conf.ACT.old
-rw-r--r-- 1 root root 86 Jul 29 2005 dhcpd.conf.example.RH
-rw-r--r-- 1 root root 2822 Jan 7 22:12 dhcpd.conf.last
-rw-r--r-- 1 root root 2821 Mar 20 2013 dhcpd.conf.lurch
-rw-r--r-- 1 root root 1918 Aug 19 2010 dhcpd.conf.test
-rw-r--r-- 1 root root 2892 Dec 18 16:42 dhcpd.conf.tftp-changes
-rw-r--r-- 1 root root 2822 Dec 18 16:01 dhcpd.conf.tftp-changes~
lrwxrwxrwx 1 root root 12 Feb 7 2013 dhcplog -> /fs1/dhcplog
-rw-r--r-- 1 root root 2518 Mar 14 2012 DIR_COLORS
-rw-r--r-- 1 root root 2420 Mar 14 2012 DIR_COLORS.xterm
-rw-r--r-- 1 root root 18484 Aug 25 2009 dnsmasq.conf
drwxr-xr-x 2 root root 4096 Aug 25 2009 dnsmasq.d/
-rw-rw-r-- 1 root disk 0 Sep 16 2011 dumpdates
-rw-r--r-- 1 root root 4843 Nov 27 2008 enscript.cfg
-rw-r--r-- 1 root root 0 Dec 5 2011 environment
-rw-r--r-- 1 root root 153 Dec 21 2011 esd.conf
-rw-r--r-- 1 root root 0 Jan 12 2000 exports
-rw-r--r-- 1 root root 22060 Jul 13 2006 fb.modes
-rw-r--r-- 1 root root 59 Jan 31 2006 filesystems
drwxr-xr-x 2 root root 4096 May 31 2012 firmware/
drwxr-xr-x 4 root root 4096 May 17 2010 fonts/
drwxr-xr-x 2 root root 4096 Sep 2 2011 foomatic/
-rw-r--r-- 1 root root 843 Mar 18 2014 fstab
-rw-r--r-- 1 root root 532 Nov 20 2010 fstab.20101120
-rw-r--r-- 1 root root 843 Oct 17 2013 fstab.20131017
-rw-r--r-- 1 root root 843 Nov 6 2013 fstab.20131106
-rw-r--r-- 1 root root 843 Mar 17 2014 fstab.20140317
-rw-r--r-- 1 root root 532 Dec 17 2011 fstab.last
-rw-r--r-- 1 root root 532 Dec 21 2011 fstab.orig
drwxr-xr-x 6 root root 4096 May 17 2010 gconf/
drwxr-xr-x 2 root root 4096 Oct 10 2013 gcrypt/
drwxr-xr-x 7 root root 4096 Sep 17 2013 gdm/
drwxr-xr-x 2 root root 4096 Sep 10 2013 ghostscript/
drwxr-xr-x 3 root root 4096 Jul 1 2013 gnome-vfs-2.0/
-rw-r--r-- 1 root root 10793 Jul 12 2006 gnome-vfs-mime-magic
-rw-r--r-- 1 root root 1756 Jul 12 2006 gpm-root.conf
-rw-r--r-- 1 root root 909 Oct 14 2014 group
-rw------- 1 root root 909 Oct 22 2013 group-
-rw-r--r-- 1 root root 751 May 17 2010 group.redhat
lrwxrwxrwx 1 root root 22 May 17 2010 grub.conf -> ../boot/grub/grub.conf
-r-------- 1 root root 765 Oct 14 2014 gshadow
-rw------- 1 root root 765 Oct 22 2013 gshadow-
-rw-r--r-- 1 root root 833 Jan 16 2007 gssapi_mech.conf
drwxr-xr-x 2 root root 4096 Feb 27 2013 gtk/
drwxr-xr-x 4 root root 4096 Jul 26 2013 gtk-2.0/
drwxr-xr-x 3 root root 4096 Aug 13 2012 hal/
-rw-r--r-- 1 root root 0 Dec 5 2011 host.conf
-rw-r--r-- 1 root root 275 Dec 21 2011 hosts
-rw-r--r-- 1 root root 226 Jun 28 2010 hosts~
-rw-r--r-- 1 root root 1721 May 15 2014 hosts.allow
-rw-r--r-- 1 root root 1676 Jan 28 2014 hosts.allow~
-rw-r--r-- 1 root root 2105 May 25 2010 hosts.allow.bundaberg
-rw-r--r-- 1 root root 1551 Jun 28 2010 hosts.allow.don
-rw-r--r-- 1 root root 252 May 25 2010 hosts.allow.orig
-rw-r--r-- 1 root root 161 Jan 12 2000 hosts.allow.redhat
-rw-r--r-- 1 root root 8 May 25 2010 hosts.deny
-rw-r--r-- 1 root root 347 Jan 12 2000 hosts.deny.redhat
-rw-r--r-- 1 root root 165 Dec 5 2011 hosts.deny.rpmnew
-rw-r--r-- 1 root root 226 Jun 24 2010 hosts.new.lurch
-rw-r--r-- 1 root root 229 Jun 24 2010 hosts.orig
drwxr-xr-x 2 root root 4096 May 31 2011 hp/
drwxr-xr-x 4 root root 4096 Oct 14 2014 httpd/
-rw-r--r-- 1 root root 3579 Feb 10 2014 idmapd.conf
lrwxrwxrwx 1 root root 11 May 17 2010 init.d -> rc.d/init.d/
-rw-r--r-- 1 root root 658 Mar 19 2014 initlog.conf
-rw-r--r-- 1 root root 1666 Mar 19 2014 inittab
-rw-r--r-- 1 root root 758 Sep 23 2004 inputrc
drwxr-xr-x 2 root root 4096 Feb 27 2013 iproute2/
drwxr-xr-x 2 root root 4096 Feb 27 2013 iscsi/
-rw-r--r-- 1 root root 75 Aug 12 2014 issue
-rw-r--r-- 1 root root 74 Aug 12 2014 issue.net
drwxr-xr-x 3 root root 4096 Feb 27 2013 java/
drwxr-xr-x 2 root root 4096 Oct 12 2012 jvm/
drwxr-xr-x 2 root root 4096 Oct 12 2012 jvm-commmon/
-rw-r--r-- 1 root root 32016 Mar 29 2011 jwhois.conf
-rw-r--r-- 1 root root 1265 Oct 14 2014 kdump.conf
-rw-r--r-- 1 root root 608 Sep 3 2014 krb5.conf
-rw-r--r-- 1 root root 9014 May 25 2010 ldap.conf
-rw-r--r-- 1 root root 9111 May 17 2010 ldap.conf.redhat
-rw------- 1 root root 9 May 25 2010 ldap.secret
-rw-r--r-- 1 root root 89567 Apr 21 01:02 ld.so.cache
-rw-r--r-- 1 root root 28 Oct 8 2006 ld.so.conf
drwxr-xr-x 2 root root 4096 Jan 19 12:15 ld.so.conf.d/
-rw-r--r-- 1 root root 3544 Jul 16 2012 lftp.conf
-rw-r----- 1 root root 191 Oct 27 2011 libaudit.conf
drwxr-xr-x 2 root root 4096 May 25 2010 libsmbios/
-rw-r--r-- 1 root root 2506 May 10 2012 libuser.conf
drwx------ 3 root root 4096 May 25 2010 libvirt/
-rw-r--r-- 1 root root 25 May 25 2010 local_ip
-rw-r--r-- 1 root root 3519 Feb 26 2006 localtime
-rw-r--r-- 1 root root 416 May 25 2010 localusers
-rw-r--r-- 1 root root 1522 May 17 2010 login.defs
-rw-r--r-- 1 root root 1435 Feb 24 2012 logrotate.conf
-rw-r--r-- 1 root root 1372 Jul 26 2010 logrotate.conf~
-rw-r--r-- 1 root root 520 Sep 2 2008 logrotate.conf.redhat
-rw-r--r-- 1 root root 619 Mar 30 2011 logrotate.conf.rpmnew
-rw-r--r-- 1 root root 1371 Jun 16 2010 logrotate.conf.save
drwxr-xr-x 2 root root 4096 Apr 21 01:01 logrotate.d/
drwxr-xr-x 4 root root 4096 Jul 11 2012 logwatch/
drwxr-xr-x 2 root root 4096 May 31 2011 lsb-release.d/
-rw-r--r-- 1 root root 10814 Feb 20 2006 ltrace.conf
drwxr-xr-x 5 root root 4096 Oct 14 2014 lvm/
-rw-r--r-- 1 root root 140191 Oct 27 2008 lynx.cfg
-rw-r--r-- 1 root root 66 Oct 27 2008 lynx-site.cfg
-rw-r--r-- 1 root root 293 Sep 5 2006 mailcap
-rw-r--r-- 1 root root 112 Jul 13 2006 mail.rc
drwxr-xr-x 2 root root 4096 May 17 2010 makedev.d/
-rw-r--r-- 1 root root 4617 Apr 17 2012 man.config
drwxr-xr-x 2 root root 4096 Feb 27 2013 maven/
-rwxr-xr-x 1 root root 2242 May 13 2011 mcelog.conf*
-rw-r--r-- 1 root root 14100 Sep 5 2006 mime.types
-rw-r--r-- 1 root root 330 Apr 14 2014 mke2fs.conf
-rw-r--r-- 1 root root 172 May 23 2014 modprobe.conf
-rw-r--r-- 1 root root 156 May 23 2014 modprobe.conf~
drwxr-xr-x 2 root root 4096 Apr 21 01:01 modprobe.d/
-rw-r--r-- 1 root root 0 Jan 12 2000 motd
-rw-r--r-- 1 root root 533 May 25 2010 motd-security
-rw-r--r-- 1 root root 602 Apr 21 03:03 mtab
-rw-r--r-- 1 root root 1983 Aug 9 2006 mtools.conf
-rw-r--r-- 1 root root 2706 May 1 2014 multipath.conf
-rw-r--r-- 1 root root 92794 Jul 4 2012 Muttrc
-rw-r--r-- 1 root root 0 Jul 4 2012 Muttrc.local
-rw-r--r-- 1 root root 441 Jan 8 2013 my.cnf
drwxr-xr-x 2 root root 4096 Nov 12 2013 netplug/
drwxr-xr-x 2 root root 4096 Nov 12 2013 netplug.d/
drwxr-xr-x 4 root root 4096 Aug 8 2011 NetworkManager/
-rw-r--r-- 1 root root 1895 Jan 19 12:13 nscd.conf
-rw-r--r-- 1 root root 1730 Apr 21 01:00 nsswitch.conf
-rw-r--r-- 1 root root 1709 Aug 8 2011 nsswitch.conf.cwru.ldap
-rw-r--r-- 1 root root 1730 Apr 21 01:00 nsswitch.conf.cwru.pre-patching
-rw-r--r-- 1 root root 1696 Sep 22 2004 nsswitch.conf.redhat
drwxr-xr-x 2 root root 4096 Feb 17 01:02 ntp/
-rw-r--r-- 1 root root 246 Aug 20 2014 ntp.conf
-rw-r--r-- 1 root root 190 Apr 14 2014 ntp.conf~
-rw-r--r-- 1 root root 190 Apr 14 2014 ntp.conf.backup.2014
-rw-r--r-- 1 root root 1833 Nov 26 2009 ntp.conf.redhat
-rw-r--r-- 1 root root 0 Oct 18 2011 odbc.ini
-rw-r--r-- 1 root root 1366 Oct 18 2011 odbcinst.ini
-rw-r--r-- 1 root root 1366 Oct 18 2011 odbcinst.ini.rpmnew
lrwxrwxrwx 1 root root 32 May 25 2010 omreg.cfg -> /opt/dell/srvadmin/etc/omreg.cfg
drwxr-xr-x 3 root root 4096 May 12 2014 openldap/
drwxr-xr-x 2 root root 4096 May 25 2010 openwsman/
drwxr-xr-x 2 root root 4096 Oct 1 2009 opt/
drwxr-xr-x 2 root root 4096 Feb 17 01:02 pam.d/
drwxr-xr-x 2 root root 4096 May 31 2012 pam_pkcs11/
-rw-r--r-- 1 root root 12 Jul 12 2006 pam_smb.conf
drwxr-xr-x 4 root root 4096 Nov 8 2011 pango/
-rw-r--r-- 1 root root 2538 Oct 14 2014 passwd
-rw-r--r-- 1 root root 2536 Oct 22 2013 passwd~
-rw-r--r-- 1 root root 2538 Apr 2 2014 passwd-
-rw-r--r-- 1 root root 2591 Jan 17 2014 passwd.20140402130113
-rw-r--r-- 1 root root 2487 Jun 9 2010 passwd.catbert
-rw-r--r-- 1 root root 2487 Jun 9 2010 passwd.OLD
-rw-r--r-- 1 root root 1871 Jun 9 2010 passwd.orig
-rw-r--r-- 1 root root 1815 May 17 2010 passwd.redhat
drwxr-xr-x 2 root root 4096 May 17 2010 pcmcia/
drwxr-xr-x 2 root root 4096 Nov 25 01:01 php.d/
-rw-r--r-- 1 root root 45081 Oct 28 09:21 php.ini
-rw-r--r-- 1 root root 2875 Sep 12 2006 pinforc
drwxr-xr-x 6 root root 4096 May 17 2010 pki/
drwxr-xr-x 5 root root 4096 Feb 27 2013 pm/
drwxr-xr-x 2 root root 4096 Oct 14 2014 postfix/
drwxr-xr-x 3 root root 4096 Oct 14 2014 ppp/
-rw-r--r-- 1 root root 262772 Apr 21 04:13 prelink.cache
-rw-r--r-- 1 root root 973 Sep 18 2008 prelink.conf
drwxr-xr-x 2 root root 4096 Sep 18 2008 prelink.conf.d/
-rw-r--r-- 1 root root 309 Apr 21 03:03 printcap
-rw-r--r-- 1 root root 135 May 17 2010 printcap.redhat
-rw-r--r-- 1 root root 1344 Dec 5 2011 profile
drwxr-xr-x 2 root root 4096 Oct 14 2014 profile.d/
-rw-r--r-- 1 root root 6108 Oct 11 2006 protocols
-rw------- 1 root root 2487 Jun 16 2010 ptmp~
-rw------- 1 root root 0 May 17 2010 .pwd.lock
-rw-r--r-- 1 root root 220 Jul 31 2012 quotagrpadmins
-rw-r--r-- 1 root root 290 Jul 31 2012 quotatab
drwxr-xr-x 3 root root 4096 Feb 27 2013 racoon/
lrwxrwxrwx 1 root root 7 Oct 14 2014 rc -> rc.d/rc*
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc0.d -> rc.d/rc0.d/
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc1.d -> rc.d/rc1.d/
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc2.d -> rc.d/rc2.d/
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc3.d -> rc.d/rc3.d/
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc4.d -> rc.d/rc4.d/
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc5.d -> rc.d/rc5.d/
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc6.d -> rc.d/rc6.d/
drwxr-xr-x 10 root root 4096 Oct 14 2014 rc.d/
lrwxrwxrwx 1 root root 13 Oct 14 2014 rc.local -> rc.d/rc.local*
lrwxrwxrwx 1 root root 15 Oct 14 2014 rc.sysinit -> rc.d/rc.sysinit*
drwxr-xr-x 2 root root 4096 May 17 2010 readahead.d/
drwxr-xr-x 2 root root 4096 May 31 2011 redhat-lsb/
-rw-r--r-- 1 root root 55 Aug 12 2014 redhat-release
-rw-r--r-- 1 root root 135 May 23 2014 resolv.conf
-rw-r--r-- 1 root root 67 May 17 2010 resolv.conf.redhat
drwxr-xr-x 3 root root 4096 May 17 2010 rhgb/
lrwxrwxrwx 1 root root 11 May 31 2012 rmt -> ../sbin/rmt*
-rw-r--r-- 1 root root 1621 Feb 12 2014 rpc
drwxr-xr-x 2 root root 4096 Nov 18 11:30 rpm/
-rw-r--r-- 1 root root 754 Mar 19 2014 rwtab
drwxr-xr-x 2 root root 4096 Mar 19 2014 rwtab.d/
drwxr-xr-x 2 root root 4096 Apr 15 2014 samba/
drwxr-xr-x 2 root root 4096 Aug 21 2012 sasl2/
-rw-r--r-- 1 root root 6972 Feb 1 2011 screenrc
-rw-r--r-- 1 root root 103 Nov 7 2006 scrollkeeper.conf
-rw-r--r-- 1 root root 666 Jun 6 2014 scsi_id.config
-rw------- 1 root root 122 Feb 17 2003 securetty
drwxr-xr-x 5 root root 4096 Apr 15 2014 security/
drwxr-xr-x 3 root root 4096 Jul 8 2014 selinux/
-rw-r--r-- 1 root root 85179 Jan 26 2010 sensors.conf
-rw-r--r-- 1 root root 362031 Feb 23 2006 services
-rw-r--r-- 1 root root 216 May 23 2013 sestatus.conf
drwxr-xr-x 2 root root 4096 Apr 21 01:01 setroubleshoot/
drwxr-xr-x 2 root root 4096 May 17 2010 setuptool.d/
drwxr-xr-x 2 root root 4096 Oct 14 2014 sfcb/
drwxr-xr-x 2 root root 4096 May 17 2010 sgml/
-r-------- 1 root root 1473 Apr 2 2014 shadow
-r-------- 1 root root 1472 Jun 16 2010 shadow~
-r-------- 1 root root 1097 May 17 2010 shadow-
-r-------- 1 root root 1505 Jan 17 2014 shadow.20140402130113
-r-------- 1 root root 1472 Jun 9 2010 shadow.catbert
-r-------- 1 root root 1472 Jun 9 2010 shadow.OLD
-r-------- 1 root root 1097 Jun 9 2010 shadow.orig
-rw-r--r-- 1 root root 60 May 17 2010 shells
drwxr-xr-x 3 root root 4096 Sep 26 2014 skel/
-rw-r--r-- 1 root root 21851 Jul 12 2006 slrn.rc
-rw-r--r-- 1 root root 6717 Aug 23 2012 smartd.conf
-rw-r--r-- 1 root root 1272 Jan 4 2008 smi.conf
drwxr-xr-x 2 root root 4096 Sep 25 2014 snmp/
drwxr-xr-x 3 root root 4096 Oct 18 2006 sound/
-rw------- 1 root root 1472 Jun 16 2010 sptmp~
drwxr-xr-x 2 root root 4096 Sep 16 2014 squid/
drwxr-xr-x 4 root root 4096 May 31 2012 ssh/
drwxr-xr-x 2 root root 4096 Oct 23 10:23 stunnel/
drwxr-xr-x 2 root root 4096 Feb 12 2014 subversion/
-r--r----- 1 root root 3553 Jan 28 2014 sudoers
-r--r----- 1 root root 800 May 25 2010 sudoers.bundaberg
-r--r----- 1 root root 3193 Apr 13 2010 sudoers.redhat
-r--r----- 1 root root 3381 Sep 15 2010 sudoers.rpmnew
-rw------- 1 root root 3500 Jun 16 2010 #sudoers.tmp#
-rw------- 1 root root 3491 Mar 7 2011 sudoers.tmp~
drwxr-xr-x 10 root root 4096 Apr 21 01:01 sysconfig/
-rw-r--r-- 1 root root 996 Mar 19 2014 sysctl.conf
-rw-r--r-- 1 root root 1413 Feb 12 2014 syslog.conf
-rw-r--r-- 1 root root 1661 Aug 24 2012 syslog.conf~
-rw-r--r-- 1 root root 694 Jan 5 2010 syslog.conf.redhat
-rw-r--r-- 1 root root 807103 Jul 12 2006 termcap
drwxr-xr-x 5 root root 4096 Oct 14 2014 udev/
-rw-r--r-- 1 root root 136 Mar 17 2009 updatedb.conf
-rw-r--r-- 1 root root 1533 Jul 10 2012 vimrc
-rw-r--r-- 1 root root 1533 Jul 10 2012 virc
drwxr-xr-x 2 root root 4096 Feb 27 2013 vsftpd/
-rw-r--r-- 1 root root 2678 Jul 31 2012 warnquota.conf
-rw-r--r-- 1 root root 23735 Jul 12 2006 webalizer.conf
-rw-r--r-- 1 root root 4204 Apr 23 2012 wgetrc
drwxr-xr-x 2 root root 4096 Oct 22 2013 wpa_supplicant/
drwxr-xr-x 9 root root 4096 Feb 17 01:01 X11/
drwxr-xr-x 4 root root 4096 May 17 2010 xdg/
-rw-r--r-- 1 root root 1001 Oct 1 2013 xinetd.conf
drwxr-xr-x 2 root root 4096 Nov 25 01:01 xinetd.d/
drwxr-xr-x 2 root root 4096 May 17 2010 xml/
drwxr-xr-x 4 root root 4096 Sep 16 2014 yum/
-rw-r--r-- 1 root root 708 Feb 7 2012 yum.conf
-rw-r--r-- 1 root root 628 Dec 21 2011 yum.conf~
-rw-r--r-- 1 root root 628 Dec 21 2011 yum.conf.bad
drwxr-xr-x 2 root root 4096 Oct 14 2014 yum.repos.d/
+3 -1
View File
@@ -177,7 +177,8 @@ bind.o: history.h rlstdc.h
callback.o: rlconf.h ansi_stdlib.h callback.o: rlconf.h ansi_stdlib.h
callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
compat.o: rlstdc.h compat.o: ${BUILD_DIR}/config.h
compat.o: rlstdc.h rltypedefs.h
complete.o: ansi_stdlib.h posixdir.h posixstat.h complete.o: ansi_stdlib.h posixdir.h posixstat.h
complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
@@ -239,6 +240,7 @@ readline.o: posixstat.h ansi_stdlib.h posixjmp.h
rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
rltty.o: rltty.h rltty.o: rltty.h
rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
savestring.o: ${BUILD_DIR}/config.h
search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
search.o: ansi_stdlib.h history.h rlstdc.h search.o: ansi_stdlib.h history.h rlstdc.h
+4 -4
View File
@@ -37,11 +37,11 @@
#include "rldefs.h" #include "rldefs.h"
#if defined (GWINSZ_IN_SYS_IOCTL)
# include <sys/ioctl.h>
#endif /* GWINSZ_IN_SYS_IOCTL */
#include "rltty.h" #include "rltty.h"
#if defined (HAVE_SYS_IOCTL_H)
# include <sys/ioctl.h> /* include for declaration of ioctl */
#endif
#include "readline.h" #include "readline.h"
#include "rlprivate.h" #include "rlprivate.h"
+3 -4
View File
@@ -51,15 +51,14 @@
/* System-specific feature definitions and include files. */ /* System-specific feature definitions and include files. */
#include "rldefs.h" #include "rldefs.h"
#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
# include <sys/ioctl.h>
#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
#ifdef __MSDOS__ #ifdef __MSDOS__
# include <pc.h> # include <pc.h>
#endif #endif
#include "rltty.h" #include "rltty.h"
#if defined (HAVE_SYS_IOCTL_H)
# include <sys/ioctl.h> /* include for declaration of ioctl */
#endif
#include "tcap.h" #include "tcap.h"
/* Some standard library routines. */ /* Some standard library routines. */
+16 -2
View File
@@ -160,6 +160,7 @@ itos.o: itos.c
mailstat.o: mailstat.c mailstat.o: mailstat.c
makepath.o: makepath.c makepath.o: makepath.c
mbscasecmp.o: mbscasecmp.c mbscasecmp.o: mbscasecmp.c
mbschr.o: mbschr.c
mbscmp.o: mbscmp.c mbscmp.o: mbscmp.c
memset.o: memset.c memset.o: memset.c
mktime.o: mktime.c mktime.o: mktime.c
@@ -177,6 +178,7 @@ shtty.o: shtty.c
snprintf.o: snprintf.c snprintf.o: snprintf.c
spell.o: spell.c spell.o: spell.c
strcasecmp.o: strcasecmp.c strcasecmp.o: strcasecmp.c
strchrnul.o: strchrnul.c
strerror.o: strerror.c strerror.o: strerror.c
strftime.o: strftime.c strftime.o: strftime.c
strcasestr.o: strcasestr.c strcasestr.o: strcasestr.c
@@ -197,11 +199,12 @@ timeval.o: timeval.c
tmpfile.o: tmpfile.c tmpfile.o: tmpfile.c
uconvert.o: uconvert.c uconvert.o: uconvert.c
ufuncs.o: ufuncs.c ufuncs.o: ufuncs.c
unicode.o: unicode.c
vprint.o: vprint.c vprint.o: vprint.c
wcsdup.o: wcsdup.c wcsdup.o: wcsdup.c
wcsnwidth.o: wcsnwidth.c wcsnwidth.o: wcsnwidth.c
wcswidth.o: wcswidth.c wcswidth.o: wcswidth.c
mbschr.o: mbschr.c winsize.o: winsize.c
zcatfd.o: zcatfd.c zcatfd.o: zcatfd.c
zmapfd.o: zmapfd.c zmapfd.o: zmapfd.c
zgetline.o: zgetline.c zgetline.o: zgetline.c
@@ -234,6 +237,7 @@ itos.o: ${BUILD_DIR}/config.h
mailstat.o: ${BUILD_DIR}/config.h mailstat.o: ${BUILD_DIR}/config.h
makepath.o: ${BUILD_DIR}/config.h makepath.o: ${BUILD_DIR}/config.h
mbscasecmp.o: ${BUILD_DIR}/config.h mbscasecmp.o: ${BUILD_DIR}/config.h
mbschr.o: ${BUILD_DIR}/config.h
mbscmp.o: ${BUILD_DIR}/config.h mbscmp.o: ${BUILD_DIR}/config.h
memset.o: ${BUILD_DIR}/config.h memset.o: ${BUILD_DIR}/config.h
mktime.o: ${BUILD_DIR}/config.h mktime.o: ${BUILD_DIR}/config.h
@@ -251,6 +255,7 @@ shtty.o: ${BUILD_DIR}/config.h
snprintf.o: ${BUILD_DIR}/config.h snprintf.o: ${BUILD_DIR}/config.h
spell.o: ${BUILD_DIR}/config.h spell.o: ${BUILD_DIR}/config.h
strcasecmp.o: ${BUILD_DIR}/config.h strcasecmp.o: ${BUILD_DIR}/config.h
strchrnul.o: ${BUILD_DIR}/config.h
strerror.o: ${BUILD_DIR}/config.h strerror.o: ${BUILD_DIR}/config.h
strftime.o: ${BUILD_DIR}/config.h strftime.o: ${BUILD_DIR}/config.h
strcasestr.o: ${BUILD_DIR}/config.h strcasestr.o: ${BUILD_DIR}/config.h
@@ -271,11 +276,12 @@ timeval.o: ${BUILD_DIR}/config.h
tmpfile.o: ${BUILD_DIR}/config.h tmpfile.o: ${BUILD_DIR}/config.h
uconvert.o: ${BUILD_DIR}/config.h uconvert.o: ${BUILD_DIR}/config.h
ufuncs.o: ${BUILD_DIR}/config.h ufuncs.o: ${BUILD_DIR}/config.h
unicode.o: ${BUILD_DIR}/config.h
vprint.o: ${BUILD_DIR}/config.h vprint.o: ${BUILD_DIR}/config.h
wcsdup.o: ${BUILD_DIR}/config.h wcsdup.o: ${BUILD_DIR}/config.h
wcsnwidth.o: ${BUILD_DIR}/config.h wcsnwidth.o: ${BUILD_DIR}/config.h
wcswidth.o: ${BUILD_DIR}/config.h wcswidth.o: ${BUILD_DIR}/config.h
mbschr.o: ${BUILD_DIR}/config.h winsize.o: ${BUILD_DIR}/config.h
zcatfd.o: ${BUILD_DIR}/config.h zcatfd.o: ${BUILD_DIR}/config.h
zgetline.o: ${BUILD_DIR}/config.h zgetline.o: ${BUILD_DIR}/config.h
zmapfd.o: ${BUILD_DIR}/config.h zmapfd.o: ${BUILD_DIR}/config.h
@@ -581,3 +587,11 @@ fnxform.o: ${topdir}/bashtypes.h
fnxform.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h fnxform.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
shmbchar.o: ${BASHINCDIR}/shmbchar.h shmbchar.o: ${BASHINCDIR}/shmbchar.h
unicode.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
unicode.o: ${BASHINCDIR}/stdc.h
unicode.o: ${topdir}/xmalloc.h
winsize.o: ${BASHINCDIR}/stdc.h
winsize.o: ${topdir}/xmalloc.h
winsize.o: ${topdir}/bashtypes.h
+2
View File
@@ -32,9 +32,11 @@
/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ /* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
#if 0
#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) #if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
# include <sys/ioctl.h> # include <sys/ioctl.h>
#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ #endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
#endif
#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) #if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
# include <termios.h> # include <termios.h>
+2 -2
View File
@@ -61,8 +61,8 @@ extern int last_command_exit_value;
sh_obj_cache_t wdcache = {0, 0, 0}; sh_obj_cache_t wdcache = {0, 0, 0};
sh_obj_cache_t wlcache = {0, 0, 0}; sh_obj_cache_t wlcache = {0, 0, 0};
#define WDCACHESIZE 60 #define WDCACHESIZE 128
#define WLCACHESIZE 60 #define WLCACHESIZE 128
static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int)); static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int));
#if defined (ARITH_FOR_COMMAND) #if defined (ARITH_FOR_COMMAND)
+1 -1
View File
@@ -116,7 +116,7 @@ redirection_error (temp, error)
int oflags; int oflags;
allocname = 0; allocname = 0;
if (temp->rflags & REDIR_VARASSIGN) if ((temp->rflags & REDIR_VARASSIGN) && error < 0)
filename = allocname = savestring (temp->redirector.filename->word); filename = allocname = savestring (temp->redirector.filename->word);
else if (temp->redirector.dest < 0) else if (temp->redirector.dest < 0)
/* This can happen when read_token_word encounters overflow, like in /* This can happen when read_token_word encounters overflow, like in
+19 -14
View File
@@ -390,9 +390,7 @@ main (argc, argv, env)
xtrace_init (); xtrace_init ();
#if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS) #if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS)
# if 1 malloc_set_register (0); /* XXX - change to 1 for malloc debugging */
malloc_set_register (1);
# endif
#endif #endif
check_dev_tty (); check_dev_tty ();
@@ -512,8 +510,6 @@ main (argc, argv, env)
} }
this_command_name = (char *)NULL; this_command_name = (char *)NULL;
cmd_init(); /* initialize the command object caches */
/* First, let the outside world know about our interactive status. /* First, let the outside world know about our interactive status.
A shell is interactive if the `-i' flag was given, or if all of A shell is interactive if the `-i' flag was given, or if all of
the following conditions are met: the following conditions are met:
@@ -684,6 +680,8 @@ main (argc, argv, env)
} }
#endif #endif
cmd_init(); /* initialize the command object caches */
if (command_execution_string) if (command_execution_string)
{ {
arg_index = bind_args (argv, arg_index, argc, 0); arg_index = bind_args (argv, arg_index, argc, 0);
@@ -1470,6 +1468,14 @@ open_shell_script (script_name)
exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT); exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT);
} }
free (dollar_vars[0]);
dollar_vars[0] = exec_argv0 ? savestring (exec_argv0) : savestring (script_name);
if (exec_argv0)
{
free (exec_argv0);
exec_argv0 = (char *)NULL;
}
if (file_isdir (filename)) if (file_isdir (filename))
{ {
#if defined (EISDIR) #if defined (EISDIR)
@@ -1481,14 +1487,6 @@ open_shell_script (script_name)
exit (EX_NOINPUT); exit (EX_NOINPUT);
} }
free (dollar_vars[0]);
dollar_vars[0] = exec_argv0 ? savestring (exec_argv0) : savestring (script_name);
if (exec_argv0)
{
free (exec_argv0);
exec_argv0 = (char *)NULL;
}
#if defined (ARRAY_VARS) #if defined (ARRAY_VARS)
GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a); GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
@@ -1521,7 +1519,14 @@ open_shell_script (script_name)
{ {
e = errno; e = errno;
if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode)) if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode))
internal_error (_("%s: is a directory"), filename); {
#if defined (EISDIR)
errno = EISDIR;
file_error (filename);
#else
internal_error (_("%s: Is a directory"), filename);
#endif
}
else else
{ {
errno = e; errno = e;
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR PATH=$PATH:$BUILD_DIR
+1 -1
View File
@@ -13,7 +13,7 @@ after exec1.sub: one two three
126 126
./execscript: line 40: /: Is a directory ./execscript: line 40: /: Is a directory
126 126
/: /: is a directory /: /: Is a directory
126 126
./execscript: line 47: .: /: is a directory ./execscript: line 47: .: /: is a directory
1 1
+3 -3
View File
@@ -18,15 +18,15 @@ trap -- 'echo [$LINENO] debug' DEBUG
[24] debug [24] debug
func[16] funcdebug func[16] funcdebug
funcdebug line funcdebug line
[26] debug ./trap.tests[26] funcdebug
trap -- 'echo exiting' EXIT trap -- 'echo exiting' EXIT
trap -- 'echo aborting' SIGHUP trap -- 'echo aborting' SIGHUP
trap -- 'echo aborting' SIGINT trap -- 'echo aborting' SIGINT
trap -- 'echo aborting' SIGQUIT trap -- 'echo aborting' SIGQUIT
trap -- 'echo aborting' SIGABRT trap -- 'echo aborting' SIGABRT
trap -- 'echo aborting' SIGTERM trap -- 'echo aborting' SIGTERM
trap -- 'echo [$LINENO] debug' DEBUG trap -- 'echo ${FUNCNAME:-$0}[$LINENO] funcdebug' DEBUG
[28] debug ./trap.tests[28] funcdebug
./trap.tests[33] debug ./trap.tests[33] debug
./trap.tests[34] debug ./trap.tests[34] debug
func2[30] debug func2[30] debug
+1 -1
View File
@@ -88,5 +88,5 @@ swizzle ()
} }
ok 1 ok 1
./vredir6.sub: redirection error: cannot duplicate fd: Invalid argument ./vredir6.sub: redirection error: cannot duplicate fd: Invalid argument
./vredir6.sub: line 13: v: Invalid argument ./vredir6.sub: line 13: /dev/null: Invalid argument
unset unset
+4 -5
View File
@@ -580,11 +580,10 @@ set_debug_trap (command)
/* Separate function to call when functions and sourced files want to restore /* Separate function to call when functions and sourced files want to restore
the original version of the DEBUG trap before returning. Unless the -T the original version of the DEBUG trap before returning. Unless the -T
option is set, source saves the old debug trap and unsets the trap. If the option is set, source and shell function execution save the old debug trap
sourced file changes the DEBUG trap, SIG_TRAPPED will be set and we don't and unset the trap. If the function or sourced file changes the DEBUG trap,
bother restoring the original trap string. SIG_TRAPPED will be set and we don't bother restoring the original trap string.
This is used by both functions and the source builtin. */
Currently only source calls this. */
void void
maybe_set_debug_trap (command) maybe_set_debug_trap (command)
char *command; char *command;
+3 -2
View File
@@ -80,6 +80,7 @@
#endif #endif
#define VARIABLES_HASH_BUCKETS 1024 /* must be power of two */ #define VARIABLES_HASH_BUCKETS 1024 /* must be power of two */
#define FUNCTIONS_HASH_BUCKETS 512
#define TEMPENV_HASH_BUCKETS 4 /* must be power of two */ #define TEMPENV_HASH_BUCKETS 4 /* must be power of two */
#define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0') #define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
@@ -315,11 +316,11 @@ create_variable_tables ()
} }
if (shell_functions == 0) if (shell_functions == 0)
shell_functions = hash_create (0); shell_functions = hash_create (FUNCTIONS_HASH_BUCKETS);
#if defined (DEBUGGER) #if defined (DEBUGGER)
if (shell_function_defs == 0) if (shell_function_defs == 0)
shell_function_defs = hash_create (0); shell_function_defs = hash_create (FUNCTIONS_HASH_BUCKETS);
#endif #endif
} }