Re: Examples of concurrent coproc usage?

2024-04-13 Thread Zachary Santer
On Sat, Apr 13, 2024 at 2:45 PM Chet Ramey wrote: > > On 4/8/24 11:44 PM, Zachary Santer wrote: > > > The fact that the current implementation allows the coproc fds to get > > into process substitutions is a little weird to me. A process > > substitution, in combination with exec, is kind of the

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

2024-04-13 Thread Dmitry Goncharov
On Sat, Apr 13, 2024 at 12:41 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]: warning: -j16 forced in submake: resetting jobserver

Re: Examples of concurrent coproc usage?

2024-04-13 Thread Robert Elz
Date:Sat, 13 Apr 2024 16:10:26 -0400 From:Chet Ramey Message-ID: <32bd9e76-24bc-4206-aa8a-8bcc81722...@case.edu> | File descriptors the user saves with exec redirections beyond [0-2] | are set to close-on-exec. POSIX makes that behavior unspecified, but | bash

Re: Exporting functions does not expand aliases in subshells

2024-04-13 Thread Chet Ramey
On 4/11/24 11:51 AM, Robert Elz wrote: For how aliases can mess things up, with the bash way of parsing command substitutions, if we do: foo() { echo hello; X=$(echo goodbye); echo "$X"; } and just run foo then we get "hello", "goodbye" (on successive lines). Let's assume that this

Re: Examples of concurrent coproc usage?

2024-04-13 Thread Chet Ramey
On 4/9/24 11:58 AM, Carl Edquist wrote: On 4/4/24 7:23 PM, Martin D Kealey wrote: I'm somewhat uneasy about having coprocs inaccessible to each other. I can foresee reasonable cases where I'd want a coproc to utilize one or more other coprocs. In particular, I can see cases where a coproc

Re: Examples of concurrent coproc usage?

2024-04-13 Thread Chet Ramey
On 4/9/24 10:46 AM, Zachary Santer wrote: If you want two processes to communicate (really three), you might want to build with the multiple coproc support and use the shell as the arbiter. If you've written a script for other people than just yourself, expecting all of them to build their

Re: Examples of concurrent coproc usage?

2024-04-13 Thread Chet Ramey
On 4/8/24 11:44 PM, Zachary Santer wrote: The fact that the current implementation allows the coproc fds to get into process substitutions is a little weird to me. A process substitution, in combination with exec, is kind of the one other way to communicate with background processes through fds

Re: Parsing regression with for loop in case statement

2024-04-13 Thread Chet Ramey
On 4/10/24 8:51 PM, nbow...@draconx.ca wrote: Bash Version: 5.2 Patch Level: 21 Release Status: release Description: The POSIX shell grammar specifies that a newline may optionally appear before the in keyword of a for loop. [...] However, if the exact same loop is placed within

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

2024-04-13 Thread Chet Ramey
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]: warning: -j16 forced in submake: resetting jobserver mode. ... Can this be fixed