Re: Bug#1069978: bash: incorrect value of $BASH for login shells

2024-04-28 Thread Gioele Barabucci
On 28/04/24 22:50, Chet Ramey wrote: On 4/28/24 3:07 PM, Gioele Barabucci wrote: $ su -l $USER -s /bin/bash-static -c 'echo $BASH; readlink /proc/$$/exe; head -1z /proc/$$/cmdline; echo' /bin/bash /usr/bin/bash-static -bash-static So argv[0] == "-bash-static", which cause

Re: Bug#1069978: bash: incorrect value of $BASH for login shells

2024-04-28 Thread Chet Ramey
On 4/28/24 3:07 PM, Gioele Barabucci wrote:     $ su -l $USER -s /bin/bash-static -c 'echo $BASH; readlink /proc/$$/exe; head -1z /proc/$$/cmdline; echo'     /bin/bash     /usr/bin/bash-static     -bash-static So argv[0] == "-bash-static", which causes $0 to be set to -bash-static and int

Re: Linux reports memfd_create() being called without MFD_EXEC or MFD_NOEXEC_SEAL set

2024-04-28 Thread Chet Ramey
On 4/28/24 2:59 PM, Andreas Schwab wrote: On Apr 28 2024, Chet Ramey wrote: On 4/27/24 8:09 AM, Andreas Schwab wrote: On Apr 27 2024, Kerin Millar wrote: At some point after upgrading to bash-5.3-alpha, the following message appeared in my kernel ring buffer. [700406.870502] bash[3089019]:

Re: Bug#1069978: bash: incorrect value of $BASH for login shells

2024-04-28 Thread Gioele Barabucci
On 28/04/24 20:01, Chet Ramey wrote: On 4/27/24 6:23 PM, Gioele Barabucci wrote: bash 5.0 and 5.2 do not set $BASH to the right value when bash is used as the login shell: $ apt install bash-static $ getent passwd $USER | cut -d: -f 7 /bin/bash $ su $USER -s /bin/bash-stat

Re: Linux reports memfd_create() being called without MFD_EXEC or MFD_NOEXEC_SEAL set

2024-04-28 Thread Andreas Schwab
On Apr 28 2024, Chet Ramey wrote: > On 4/27/24 8:09 AM, Andreas Schwab wrote: >> On Apr 27 2024, Kerin Millar wrote: >> >>> At some point after upgrading to bash-5.3-alpha, the following message >>> appeared in my kernel ring buffer. >>> >>> [700406.870502] bash[3089019]: memfd_create() called w

Re: Examples of concurrent coproc usage?

2024-04-28 Thread Chet Ramey
On 4/27/24 12:56 PM, Carl Edquist wrote: On Mon, 22 Apr 2024, Chet Ramey wrote: You might be surprised. The OP was sending thousands of calculations to (I think) GNU bc, which had some resource consumption issue that resulted in it eventually hanging, unresponsive. The kill was the solution t

Re: [bug #65651] argument reference inconsistency

2024-04-28 Thread Chet Ramey
On 4/28/24 1:10 PM, Lawrence Velázquez wrote: On Sun, Apr 28, 2024, at 7:59 AM, Emanuele Torre wrote: I don't know why this savannah ticket has been crossposted to @bug-bash, but its replies have not been crossposted here: it is very confusing. Apparently it's not possible to have the replies

Re: [bug #65651] argument reference inconsistency

2024-04-28 Thread Chet Ramey
On 4/28/24 7:59 AM, Emanuele Torre wrote: I don't know why this savannah ticket has been crossposted to @bug-bash, but its replies have not been crossposted here: it is very confusing. Because savannah can't do that. The original request was to have one place to go to for bug reports. The best

Re: bash: ":?xxx" filename broken on autocomplete

2024-04-28 Thread Chet Ramey
On 4/27/24 5:46 PM, Kerin Millar wrote: On Sat, 27 Apr 2024 23:28:49 +0200 Gioele Barabucci wrote: Control: found -1 5.2.21-2 On Tue, 27 Aug 2019 16:36:03 +0200 Philipp Marek wrote: the autocompletion is broken on filenames or directories with ":?" at the beginning. # mkdir ':?aa'

Re: bash: ":?xxx" filename broken on autocomplete

2024-04-28 Thread Chet Ramey
On 4/27/24 5:28 PM, Gioele Barabucci wrote: Control: found -1 5.2.21-2 On Tue, 27 Aug 2019 16:36:03 +0200 Philipp Marek wrote: the autocompletion is broken on filenames or directories with ":?" at the beginning.     # mkdir ':?aa'     # rmdir : gives me     # rmdir :\:\? which doesn't ma

Re: Linux reports memfd_create() being called without MFD_EXEC or MFD_NOEXEC_SEAL set

2024-04-28 Thread Chet Ramey
On 4/27/24 8:09 AM, Andreas Schwab wrote: On Apr 27 2024, Kerin Millar wrote: At some point after upgrading to bash-5.3-alpha, the following message appeared in my kernel ring buffer. [700406.870502] bash[3089019]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set This warning

Re: Linux reports memfd_create() being called without MFD_EXEC or MFD_NOEXEC_SEAL set

2024-04-28 Thread Chet Ramey
On 4/27/24 6:00 AM, Kerin Millar wrote: Hi, At some point after upgrading to bash-5.3-alpha, the following message appeared in my kernel ring buffer. [700406.870502] bash[3089019]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set Unfortunately, it took me a while to notice the p

Re: [[...]] documentation claims tilde expansion and process substitution occur within double quotes

2024-04-28 Thread Chet Ramey
On 4/26/24 5:36 PM, Lawrence Velázquez wrote: Both the manual [1] and man page [2] state: The words between the [[ and ]] do not undergo word splitting and filename expansion. The shell performs tilde expansion, parameter and variable expansion, arithmetic expansion,

Re: [5.3-alpha] ">& /some/file" would fail when /some/file already exists

2024-04-28 Thread Chet Ramey
On 4/26/24 3:42 AM, Grisha Levit wrote: Looks like RX_* values were previously used only to form the `flags' argument of do_redirections() and related functions, comprising:     RX_ACTIVE RX_UNDOABLE RX_CLEXEC Separately, the REDIRECTION struct has a `flags' member holding O_* flags passed t

Re: [bug #65651] argument reference inconsistency

2024-04-28 Thread Lawrence Velázquez
On Sun, Apr 28, 2024, at 7:59 AM, Emanuele Torre wrote: > I don't know why this savannah ticket has been crossposted to @bug-bash, > but its replies have not been crossposted here: it is very confusing. Apparently it's not possible to have the replies crossposted: https://savannah.gnu.org/support

Readdelim (was Re: Examples of concurrent coproc usage)

2024-04-28 Thread Martin D Kealey
On Sun, 28 Apr 2024, 05:03 Carl Edquist, wrote: > > > I would hope that mapfile/readarray could do better, since it's not > > obligated to leave anything in the input stream. > > That is an interesting thought, although mapfile seems to read a byte at a > time also. > > [I'm not suggesting this s

Re: [bug #65651] argument reference inconsistency

2024-04-28 Thread alex xmb sw ratchev
On Sun, Apr 28, 2024, 13:59 Emanuele Torre wrote: > I don't know why this savannah ticket has been crossposted to @bug-bash, > but its replies have not been crossposted here: it is very confusing. > cool , thanks ... btw got me the link ? thxx && bless Anyway, they already got a response on sav

Re: Examples of concurrent coproc usage?

2024-04-28 Thread Zachary Santer
On Sat, Apr 27, 2024 at 1:01 PM Carl Edquist wrote: > > On Mon, 22 Apr 2024, Martin D Kealey wrote: > > > On Mon, 22 Apr 2024, 09:17 Carl Edquist, wrote: > > > >> But yeah currently a pipe with a series of records and multiple > >> cooperating/competing readers perhaps only works if the records h

Re: [bug #65651] argument reference inconsistency

2024-04-28 Thread Emanuele Torre
I don't know why this savannah ticket has been crossposted to @bug-bash, but its replies have not been crossposted here: it is very confusing. Anyway, they already got a response on savannah. o/ emanuele6

Re: [bug #65651] argument reference inconsistency

2024-04-28 Thread alex xmb sw ratchev
On Sun, Apr 28, 2024, 08:52 anonymous wrote: > URL: > > > Summary: argument reference inconsistency >Group: The GNU Bourne-Again SHell >Submitter: None >Submitted: Sun 28 Apr 2024 06:51:4