Re: An xtrace variant

2020-06-29 Thread Robert Elz
Date:Sun, 28 Jun 2020 15:19:27 -0400 From:wor...@alum.mit.edu (Dale R. Worley) Message-ID: <87h7uv0zi8@hobgoblin.ariadne.com> | For a long time, I've wanted a variant of -x that only echoed the simple | commands after bash is done executing the startup files.

Re: Undocumented feature: Unnamed fifo '<(:)'

2020-06-29 Thread Robert Elz
Date:Sun, 28 Jun 2020 17:27:47 -0400 From:Eli Schwartz Message-ID: <346bda2f-83dc-afda-d911-9688daefb...@archlinux.org> | Sure, and that can be pointed out, but that's a long way away from what | Dennis actually said, which is "why not just use a function", I thi

Bash manual bug : redundant info

2020-06-29 Thread 홍홍
In 4.3.2 The Shopt Builtin, The statement below appears twice redundantly. The return status when listing options is zero if all optnames are enabled, non-zero otherwise. When setting or unsetting options, the return status is zero unless an optname is not a valid shell option.

Re: Undocumented feature: Unnamed fifo '<(:)'

2020-06-29 Thread Eli Schwartz
On 6/29/20 6:06 AM, Robert Elz wrote: > Perhaps, but that would be a bizarre way to accomplish that. I got > the impression that the assumption was that there would somehow be just > one fork, no matter how many times the conversion was required. I > think that might be possible using bash - bu

Re: Undocumented feature: Unnamed fifo '<(:)'

2020-06-29 Thread Greg Wooledge
On Sun, Jun 28, 2020 at 03:49:45PM +0200, felix wrote: > Bash Versions: 3.2.57(1)-release, 5.0.3(1)-release, 5.1.0(1)-alpha > > In order to reduce forks and make some tasks a lot quicker, I run > forked filters as background tasks, with dedicated I/O fd. As Pierre already suggested, you appear to

Re: [PATCH 0/3] Fix cross-compiling for FreeBSD/RISC-V

2020-06-29 Thread Chet Ramey
On 6/27/20 4:06 PM, Jessica Clarke wrote: > This patch series includes the necessary changes for bash to > cross-compile for FreeBSD/RISC-V, and likely also FreeBSD/arm64, though > I have not tested that. Thanks for the fixes. Which bash version did you start with? -- ``The lyf so short, the cr

Re: [PATCH 1/3] aclocal.m4: Fix BASH_FUNC_STRSIGNAL when compiling for FreeBSD/RISC-V

2020-06-29 Thread Chet Ramey
On 6/27/20 4:06 PM, Jessica Clarke wrote: > POSIX defines strsignal(3) as being in string.h, not signal.h. We leave > the test as also checking signal.h for compatibility with any legacy > non-conforming systems. Thanks. This was fixed in the devel branch back last September as the result of http

Re: [PATCH 0/3] Fix cross-compiling for FreeBSD/RISC-V

2020-06-29 Thread Jessica Clarke
On 29 Jun 2020, at 15:37, Chet Ramey wrote: > On 6/27/20 4:06 PM, Jessica Clarke wrote: >> This patch series includes the necessary changes for bash to >> cross-compile for FreeBSD/RISC-V, and likely also FreeBSD/arm64, though >> I have not tested that. > > Thanks for the fixes. Which bash versio

Re: [PATCH 2/3] aclocal.m4: Fix BASH_FUNC_SBRK when cross-compiling for FreeBSD/RISC-V

2020-06-29 Thread Chet Ramey
On 6/27/20 4:06 PM, Jessica Clarke wrote: > FreeBSD unconditionally provides a prototype for sbrk(2), but on recent > ports (AArch64 and RISC-V) it does not provide the deprecated symbol. > This means that, when cross-compiling, we currently only get to use > AC_CHECK_FUNCS_ONCE, and so believe sbr

Re: [PATCH] finfo.c: Fix -Wformat warnings

2020-06-29 Thread Chet Ramey
On 6/27/20 4:09 PM, Jessica Clarke wrote: > We must cast these to unsigned long like the surrounding code. Thanks for the report and fix. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.

Re: [PATCH] Makefile.in: Fix out-of-tree build

2020-06-29 Thread Chet Ramey
On 6/27/20 4:10 PM, Jessica Clarke wrote: > y.tab.h is present in the source directory, not generated in the build > directory. I distribute bash with y.tab.c and y.tab.h to avoid any dependency on bison. BSD yacc is not up to the job. -- ``The lyf so short, the craft so long to lerne.'' - Chau

Re: [PATCH] unwind_prot.c: Avoid buffer overflow

2020-06-29 Thread Chet Ramey
On 6/27/20 5:14 PM, Jessica Clarke wrote: > In unwind_protect_mem_internal, we must make sure to allocate at least a > full UNWIND_ELT, even if the required size for desired_setting is less > than the remaining padding in UNWIND_ELT. Otherwise when we come to > memset it with 0xdf in unwind_frame_d

Re: [PATCH] Makefile.in: Make for loop failures fatal

2020-06-29 Thread Chet Ramey
On 6/27/20 4:10 PM, Jessica Clarke wrote: > Without set -e, these for loops will exit with code 0 and so make will > regard the recipes as being successful. If the last command in the body exits with status 0, yes. I'm going to do this a different way that doesn't use `set -e'. Chet -- ``The ly

Re: Bash manual bug : redundant info

2020-06-29 Thread Chet Ramey
On 6/29/20 6:27 AM, 홍홍 wrote: > In 4.3.2 The Shopt Builtin, > > The statement below appears twice redundantly. > > The return status when listing options is zero if all optnames are enabled, > non-zero otherwise. When setting or unsetting options, the return status is > zero unless an optname i

Re: An xtrace variant

2020-06-29 Thread Chet Ramey
On 6/28/20 9:49 PM, Dale R. Worley wrote: > Eli Schwartz writes: >> Why not just run bash -x script-name without the bash -l option and >> without $BASH_ENV set? >> >> The first is implicitly true based on your stated command line. The >> second doesn't seem like a high bar to set, and it's not ex

Re: An xtrace variant

2020-06-29 Thread Eli Schwartz
On 6/28/20 9:49 PM, Dale R. Worley wrote: > Eli Schwartz writes: >> Why not just run bash -x script-name without the bash -l option and >> without $BASH_ENV set? >> >> The first is implicitly true based on your stated command line. The >> second doesn't seem like a high bar to set, and it's not ex

‘command … &’ creates subshell

2020-06-29 Thread Dmitry Alexandrov
Dear maintainer, I believe, that the current behaviour of GNU Bash: $ command cat & [1] 3831 $ ps --pid $! --ppid $! PID TTY TIME CMD 3831 pts/300:00:00 bash 3832 pts/300:00:00 cat is problematic. Namely it is: 1) unexpected,

bash 5.0 on AIX 7.2 server -- Division by 0 when using bash from shell window

2020-06-29 Thread Krongard, William T. (BLM)
Configuration Information [Automatically generated, do not change]: Machine: powerpc OS: aix6.1.9.0 Compiler: /opt/freeware/bin/gcc -maix64 -O2 Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: AIX es2a236d 2 7 00C746B74C00 Machine Type: powerpc-ibm-aix6.1.9.0 Bash Ve

Re: bash 5.0 on AIX 7.2 server -- Division by 0 when using bash from shell window

2020-06-29 Thread Greg Wooledge
On Mon, Jun 29, 2020 at 08:24:01PM +, Krongard, William T. (BLM) wrote: > Description: > execution of "bash" from shell window gets a division by zero message > # bash > bash: (1-0/roothome1): division by 0 (error token is "roothome1)") > bash: (1-0/roothome1): division by 0 (error toke

Re: An xtrace variant

2020-06-29 Thread Dale R. Worley
Robert Elz writes: > The NetBSD sh (this time alone I believe) also has a -X (not that part, I > think one or two other shells also have unrelated -X options) which acts > just like -X, except it locks the output to stderr as it is at the time > the -X option is enabled (until -X is unset). [...]