Re: [Help-bash] difference of $? and ${PIPESTATUS[0]}

2024-04-21 Thread Kerin Millar
On Mon, 22 Apr 2024, at 7:13 AM, felix wrote: > Hi, > > Comming on this very old thread: > > On Wed, 4 Dec 2013 14:40:11 -0500, Greg Wooledge wrote: >> >> The most obvious difference is that $? is shorter. >> >> $? is also POSIX standard (older than POSIX in fact), so it works in sh >> scripts as

Re: [Help-bash] difference of $? and ${PIPESTATUS[0]}

2024-04-21 Thread felix
Hi, Comming on this very old thread: On Wed, 4 Dec 2013 14:40:11 -0500, Greg Wooledge wrote: > > The most obvious difference is that $? is shorter. > > $? is also POSIX standard (older than POSIX in fact), so it works in sh > scripts as well. PIPESTATUS is a Bash extension. > > Finally, note

Re: bash newgrp(1) -c option? Fwd: /usr/bin/sg in Cygwin?

2024-04-21 Thread Lawrence Velázquez
On Mon, Apr 22, 2024, at 1:41 AM, Cedric Blancher wrote: > The Solaris ksh93-integration version of ksh93 has a newgrp -c option > (David Korn, Glenn Fowler and Roland Mainz did implement it), which > works like ksh93/bash -c, and executes script under the requested > group, and upon exiting resume

bash newgrp(1) -c option? Fwd: /usr/bin/sg in Cygwin?

2024-04-21 Thread Cedric Blancher
Chet, The Solaris ksh93-integration version of ksh93 has a newgrp -c option (David Korn, Glenn Fowler and Roland Mainz did implement it), which works like ksh93/bash -c, and executes script under the requested group, and upon exiting resumes the old shell with the old group. Could you please impl

Re: bash parallel build: make[1]: warning: -j16 forced in submake: resetting jobserver mode.

2024-04-21 Thread Oğuz
On Monday, April 22, 2024, Dan Shelton wrote: > Passing -j to submakes ist just wrong. All submakes and the parent > should be part of ONE GNU make jobserver. > Is MFLAGS used for anything other than compatibility with ancient makes? Why doesn't GNU make just strip the j flag from it? -- Oğuz

Re: bash parallel build: make[1]: warning: -j16 forced in submake: resetting jobserver mode.

2024-04-21 Thread Dan Shelton
On Sat, 13 Apr 2024 at 17:27, Chet Ramey wrote: > > On 4/13/24 12:40 AM, Cedric Blancher wrote: > > Good morning! > > > > Building bash HEAD on Cygwin 3.5.3 and Debian Linux 11 in make > > parallel mode issues a warning, which looks like a Makefile bug: > > $ make -h 16 > > ... > > make[1]: warni

Re: Examples of concurrent coproc usage?

2024-04-21 Thread Carl Edquist via Bug reports for the GNU Bourne Again SHell
On Mon, 22 Apr 2024, Martin D Kealey wrote: On Sun, 21 Apr 2024, 10:13 Carl Edquist, wrote: You mean, specifically in order to implement a slightly-more-efficient 'read' builtin in the shell? The read built-in in the shell is only one case that would benefit from such a syscall. The purp

Re: Erasing sensitive data from memory?

2024-04-21 Thread Zachary Santer
On Sun, Apr 21, 2024 at 3:05 PM Greg Wooledge wrote: > > seems to be relevant here. > I won't say that you have malicious intent here, but a script that > behaves in this way is just a step or two away from being a password > intercepter. Would you believ

Re: Erasing sensitive data from memory?

2024-04-21 Thread Greg Wooledge
On Sun, Apr 21, 2024 at 02:16:57PM -0400, Zachary Santer wrote: > $ IFS='' read -e -r -s -p 'password: ' password > password: seems to be relevant here. I won't say that you have malicious intent here, but a script that behaves in this way is just a step o

Erasing sensitive data from memory?

2024-04-21 Thread Zachary Santer
C23 provides memset_explicit() to ensure memory containing sensitive data is cleared.[1] Using a function like this is necessary to avoid compilers optimizing out the operation. Of course, bash isn't optimizing your script for you, but consider this kind of naive solution: $ IFS='' read -e -r -s -

Re: Examples of concurrent coproc usage?

2024-04-21 Thread Martin D Kealey
On Sun, 21 Apr 2024, 10:13 Carl Edquist, wrote: > On Thu, 18 Apr 2024, Martin D Kealey wrote: > > Has anyone tried asking any of the kernel teams (Linux, BSD, or other) > > to add a new system call such as readln() or readd()? > > You mean, specifically in order to implement a slightly-more-effic

Re: Examples of concurrent coproc usage?

2024-04-21 Thread Martin D Kealey
On Sat, 20 Apr 2024 at 01:14, Chet Ramey wrote: > On 4/17/24 8:55 PM, Martin D Kealey wrote: > > Has anyone tried asking any of the kernel teams (Linux, BSD, or other) to > > add a new system call such as readln() or readd()? > > They'd probably point you to an optimized version of getdelim/getli