Re: Vars not set when sourcing w/ abs path, set -a

2021-07-27 Thread Van Klaveren, Brian N.
Ah that's it. That totally makes sense in retrospect, this is because I'm basically sourcing the `set -a` so the second time it's set, but also the first time `env` doesn't see the local. (2) is what I was trying to achieve. Thanks! Sorry for the noise. Brian > On J

Vars not set when sourcing w/ abs path, set -a

2021-07-27 Thread Van Klaveren, Brian N.
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname o

bash doc: misspelling "abd" -> "and"

2020-06-16 Thread Brian Dyson
f those commands for any other command-specific actions. Thanks! ;-D Brian Dyson

Re: proper bash configure behavior when /dev/stdin is present, /dev/{,self/}fd are not?

2018-04-10 Thread Brian Carnes
QNX). Here's a revised submission with the patches applied to configure.ac and aclocal.m4 as well. On Tue, Apr 10, 2018 at 7:49 AM, Chet Ramey wrote: > On 4/9/18 7:20 PM, Brian Carnes wrote: > > Chet, > > > > Please find attached patches for bash 4.3.x and 4.4 for

Re: proper bash configure behavior when /dev/stdin is present, /dev/{,self/}fd are not?

2018-04-09 Thread Brian Carnes
nclude applies cleanly to either. The 4.4 format-patch output applies cleanly to git latest. Regards, Brian bash-qnx6+7.tgz Description: application/gzip

proper bash configure behavior when /dev/stdin is present, /dev/{,self/}fd are not?

2018-03-28 Thread Brian Carnes
When configuring bash on a self-hosted QNX 6.6 or QNX7 system: This is an OS that has /dev/stdin and friends, but does not have /dev/fd. When blind cross-compiling bash for QNX, one would get a guess answer of: bash_cv_dev_fd=standard bash_cv_dev_stdin=present When doing the safer self-hoste

proper bash configure behavior when /dev/stdin is present, /dev/{,self/}fd are not?

2018-03-28 Thread Brian Carnes
When configuring bash on a self-hosted QNX 6.6 or QNX7 system: This is an OS that has /dev/stdin and friends, but does not have /dev/fd. When blind cross-compiling bash for QNX, one would get a guess answer of: bash_cv_dev_fd=standard bash_cv_dev_stdin=present When doing the safer self-hoste

null pointer deref, segfault

2017-01-23 Thread Brian 'geeknik' Carpenter
Going through some ancient bug reports and I came across https://savannah.gnu.org/support/index.php?108884 which apparently nobody uses anymore. <<$(()())|>_[$($(<<0)) crashes bash on Debian, Red Hat, FreeBSD, etc. Regards, Brian 'geeknik' Carpenter https://twitter.com/geeknik

Scripts passed into "-c" with an embedded newline won't execute trap if last command fails

2016-04-21 Thread Brian Vandenberg
INPROGRESS) == 0) free_trap_command (sig); trap_list[sig] = value; sigmodes[sig] |= SIG_TRAPPED; if (value == (char *)IGNORE_SIG) sigmodes[sig] |= SIG_IGNORED; else sigmodes[sig] &= ~SIG_IGNORED; if (sigmodes[sig] & SIG_INPROGRESS) sigmodes[sig] |= SIG_CHANGED; + + if( sigmodes[sig] & SIG_TRAPPED ) { + current_traps |= 1 << sig; + } else { + current_traps &= ~(1 << sig); + } } ... then alter the block quoted above in parse_and_execute to check the value of "current_traps". -brian

null ptr deref in bash

2016-02-29 Thread Brian Carpenter
_cmd.c:788 #9 0x004879b5 in execute_command (command=0x0) at execute_cmd.c:390 #10 0x0042c9b3 in reader_loop () at eval.c:160 #11 0x00429383 in main (argc=, argv=, env=) at shell.c:756 Regards, Brian 'geeknik' Carpenter https://twitter.com/geeknik

Re: null ptr deref and segfault in parameter_brace_transform.isra.17 () at subst.c:6827 (bash 4.4.0(1)-beta)

2015-09-19 Thread Brian Carpenter
Anyways, if you have any other questions or comments, feel free to send them my way. On Sat, Sep 19, 2015 at 11:33 PM, Eduardo A. Bustamante López < dual...@gmail.com> wrote: > On Sat, Sep 19, 2015 at 11:17:33PM -0500, Brian Carpenter wrote: > > I found another null ptr deref an

null ptr deref and segfault in parameter_brace_transform.isra.17 () at subst.c:6827 (bash 4.4.0(1)-beta)

2015-09-19 Thread Brian Carpenter
thread stack using the --main-stacksize= flag. ==40990== The main thread stack size used in this run was 8388608. Segmentation fault Regards, Brian 'geeknik' Carpenter

null ptr deref + segfault bash 4.4.0(1)-beta

2015-09-19 Thread Brian Carpenter
522== overflow in your program's main thread (unlikely but ==15522== possible), you can try to increase the size of the ==15522== main thread stack using the --main-stacksize= flag. ==15522== The main thread stack size used in this run was 8388608. Segmentation fault Regards, Brian

segfault in extract_delimited_string () at subst.c:1291 (bash 4.4.0(1)-beta)

2015-09-19 Thread Brian Carpenter
uninitialised values come from ==47296== ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 2 from 2) Segmentation fault Regards, Brian 'geeknik' Carpenter test00 Description: Binary data

null ptr deref / segfault in bash 4.4.0(1)-beta

2015-09-18 Thread Brian Carpenter
0x7fffd290 140737488343696 r140xbaad48 12234056 r150x7fffd292 140737488343698 rip0x46e899 0x46e899 eflags 0x10246 [ PF ZF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 fs 0x0 0 gs

4-byte script triggers null ptr deref and segfault

2015-09-17 Thread Brian Carpenter
While fuzzing GNU bash version 4.3.42(1)-release (x86_64-unknown-linux-gnu) with AFL(http://lcamtuf.coredump.cx/afl), I stumbled upon a 4-byte 'script' that triggers a null ptr deref and causes a segfault. https://savannah.gnu.org/support/index.php?108885

null ptr deref & segfault in multiple versions of bash

2015-09-16 Thread Brian Carpenter
<<$(()())|>_[$($(<<0)) triggers a null ptr deref and segfault in multiple versions of bash https://savannah.gnu.org/support/index.php?108884

Extending Bash brace expansion

2015-02-09 Thread McGuinness, Brian
xically, e.g. via strcmp(), strcoll(), or some other such. Examples {0.1..2.3} generates the sequence 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 {q..af} generates the sequence q r s t u v w x y z aa ab ac ad ae af /usr/{ucb/{ex,edit},lib

Extending brace expansion

2015-01-24 Thread McGuinness, Brian
I have been experimenting with code to allow sequences to be included in lists and to extend sequences to arbitrary character strings. This seems to work well now. Please feel free to incorporate this into future versions of the Bash shell. --- Brian #include #include "BraceExpan

Re: REGRESSION: shellshock patch rejects valid function names

2014-09-26 Thread Brian J. Fox
s to use--is a "duh, you shouldn't > have done that, fix your s**t" scenario, can we at least 1) document this > behavior change and 2) start a deprecation schedule on function/export > supporting these identifiers in the first place? Thanks, Brian -- Brian J. Fox Technology Partner The Okori Group, LLC A: 901 Olive St., 93101 O: 805.617.4048 C: 805.317.4048

Re: xtrace output on new file descriptor

2009-12-10 Thread Brian J. Murrell
On Thu, 2009-12-10 at 22:20 -0500, Chet Ramey wrote: > > Nothing good. Pity. > The next version of bash will allow you specify an arbitrary > file descriptor where the xtrace output will be written. Cool. I wonder how long it will take the distros to pick that up though. Sure, I could build

xtrace output on new file descriptor

2009-12-10 Thread Brian J. Murrell
I'm wondering if anyone has any tricks to preserve stderr on filedescriptor 2 and get xtrace output on a different file descriptor. I've pulled hair trying to get the redirection right for this but just come up with the right combination. I'd imagine it involves stashing away fd 2, duplicating fd

Re: preventing pipe reader from existing on writer exiting

2009-10-01 Thread Brian J. Murrell
On Wed, 2009-09-30 at 23:13 +0200, Andreas Schwab wrote: > > Just make sure the write side of the pipe is not closed prematurely. Hrm. Yes, of course. John's solution of having a null writer keeping it open is one way -- which I might just use. > $ (n=0; while [ $n -lt 10 ]; do cat /dev/zero;

preventing pipe reader from existing on writer exiting

2009-09-30 Thread Brian J. Murrell
Let's say I have the following (contrived, simplified example): $ mknod /tmp/fifo $ cat /dev/zero > /tmp/fifo & $ cat < /tmp/fifo When the first cat exits (i.e. is terminated) the second cat stops. The problem is that I want to be able to restart the first cat and have the second cat just keep r

trying to make sense of BASH_LINENO

2009-03-20 Thread Brian J. Murrell
I'm trying to write a "stack trace" function and BASH_LINENO doesn't make sense sometimes and doesn't appear too accurate at others. Here's my test script: shopt -s extdebug trap 'backtrace' ERR set -E backtrace() { echo "FUNCNAME: ${funcna...@]}" echo "BASH_SOURCE: ${bash_sour...@]}"

Re: manually pipe processes

2009-03-05 Thread Brian J. Murrell
On Thu, 2009-03-05 at 13:47 -0500, Greg Wooledge wrote: > > That might be a little more heavy-handed than you were looking for, > but since you're already hitting /tmp it shouldn't be terrible to add > a FIFO there. Yeah. I really didn't want to use a named pipe for this. Thanx for the help tho

manually pipe processes

2009-03-05 Thread Brian J. Murrell
Hi, I want to effect this pipeline: tar cf - /etc | tar xf - | tee /tmp/outfile manually. It seems that some form of file descriptor manipulation (i.e. moving, duplication, etc.) should be able to achieve this, but I can't seem to figure it out. Why would I want to do this? Because I want (sp

Re: Bash RFE: Goto (especially for jumping while debugging)

2008-09-22 Thread Brian J. Murrell
On Mon, 2008-09-22 at 20:44 +0100, Richard Neill wrote: > How about... > --- > #!/bin/bash > > #initialisation stuff goes here. > if false; then > > #lots of stuff here that I want to skip. > #Bash doesn't have a multi-line comment feature. > #Even if it did, one can't do a mu

Re: broken pipe

2008-02-13 Thread Brian J. Murrell
On Wed, 2008-02-13 at 16:00 -0500, Brian J. Murrell wrote: > > find / -type f -print 2>&1 | head -20 || true Doh! This of course won't work. The first solution should though. b. signature.asc Description: This is a digitally signed message part

Re: broken pipe

2008-02-13 Thread Brian J. Murrell
On Wed, 2008-02-13 at 14:56 -0600, Michael Potter wrote: > Bash Bunch, > > I googled a bit and it see this problem asked several times, but I > never really saw a slick solution: > > given this: > > set -o pipefail > find / -type f -print 2>&1 |head -20 > echo ${PIPESTATUS[*]} > > prints this:

time limiting command execution

2008-01-17 Thread Brian J. Murrell
I am trying to write a function to (wall-clock) timelimit a command's execution time but damned if I cannot eliminate all of the races. Here is my current iteration of the function: 1 timed_run() { 2local SLEEP_TIME=$1 3shift 4 5set +o monitor 6 7# start command running 8

waiting for process in process substitution

2007-03-14 Thread Brian J. Murrell
to illustrate that the cat should exit here exec 3>&- while [ -f foo ]; do sleep 1 done exit But it's just so ugly. For what it's worth, the process in the substitution is expect and what I am feeding it from the script is an expect script

Re: reading the first colums of text file

2007-02-04 Thread Brian J. Murrell
k I was purely considering the cost of fork/exec. In any case, dead horses and all. b. -- My other computer is your Microsoft Windows server. Brian J. Murrell signature.asc Description: This is a digitally signed message part ___ Bug-bash mailing list Bu

Re: reading the first colums of text file

2007-02-04 Thread Brian J. Murrell
On Sat, 2007-02-03 at 23:30 -0500, Paul Jarc wrote: > "Brian J. Murrell" <[EMAIL PROTECTED]> wrote: > > < <(cat $file) > > http://partmaps.org/era/unix/award.html LOL. Too right. I am just so used to using process redirection to solve the old "but my

Re: reading the first colums of text file

2007-02-03 Thread Brian J. Murrell
1 rest; do echo $column1 done Or if you need the data in the calling shell's context: while read column1 rest; do # the goodies are in $column1 done < <(cat $file) Probably a dozen other ways to do it too. b. -- My other computer is your Microsoft Windows server. Brian J. Murre

BASH_COMMAND

2006-08-25 Thread Brian J. Murrell
ND' ERR $ false false given the explanation in the manpage. I must be misunderstanding something. b. -- My other computer is your Microsoft Windows server. Brian J. Murrell signature.asc Description: This is a digitally signed message part ___ B

PATCH: direct xtrace to a file descriptor

2006-07-28 Thread Brian J. Murrell
rintf (xtrace_stream, "%s", (arg2 && *arg2) ? arg2 : "''"); } - fprintf (stderr, " ]]\n"); + fprintf (xtrace_stream, " ]]\n"); + fflush (xtrace_stream); } #endif /* COND_COMMAND */ @@ -785,11 +825,12 @@ { WORD_LIST *

incomplete execution in long backtick expansion

2006-03-10 Thread Brian Minton
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash

backtick expansion is truncated

2006-03-04 Thread Brian Minton
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='ba

Trotz Stellenabbau

2005-05-15 Thread brian
Lese selbst: http://www.spiegel.de/wirtschaft/0,1518,338652,00.html ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash