Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread clime
On Sun, 1 Nov 2020 at 21:23, Chet Ramey wrote: > > On 11/1/20 5:13 AM, clime wrote: > > > Work with process groups should be natural in bash. It can't be that > > complex. I struggled with this for several hours and found lots of > > people on the net that struggled with the same problem too. > >

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread Chet Ramey
On 11/1/20 5:13 AM, clime wrote: > Work with process groups should be natural in bash. It can't be that > complex. I struggled with this for several hours and found lots of > people on the net that struggled with the same problem too. It is natural, and job control is the most natural way to do

Re: Problem with reverse-i-search in 5.1.0(1)-rc1

2020-11-01 Thread Chet Ramey
On 10/31/20 11:00 AM, Detlef Vollmann wrote: > Hello, > > since Bash-5.1-rc1 doesn't work for me as previously. > I have the following entries in my history: > man a > man b > > Now I type ' m a n' and get: > (reverse-i-search)`man': man b > > Now I type '' again. > What I would expect (and

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread Eli Schwartz
On 11/1/20 11:48 AM, Oğuz wrote: > 1 Kasım 2020 Pazar tarihinde clime yazdı: >> Hello, it doesn't work for me: >> >> $ export BASH_LOADABLES_BUILTIN=1 > > > by set, I meant to a path where loadable builtin binaries reside It would be superbly helpful to mention the right variable though... $

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread Oğuz
1 Kasım 2020 Pazar tarihinde clime yazdı: > On Sun, 1 Nov 2020 at 11:01, Oğuz wrote: > > > > > > > > 1 Kasım 2020 Pazar tarihinde clime yazdı: > > ... > >> > >> Please, provide a syntactic construct to spawn a new process group (or > >> at least there should be some usable command to do that).

Re: Problem with reverse-i-search in 5.1.0(1)-rc1

2020-11-01 Thread Detlef Vollmann
On 10/31/20 4:00 PM, Detlef Vollmann wrote: Hello, since Bash-5.1-rc1 doesn't work for me as previously. I have the following entries in my history: man a man b Now I type ' m a n' and get: (reverse-i-search)`man': man b Now I type '' again. What I would expect (and what I got with 5.0) is:

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread felix
On Sun, Nov 01, 2020 at 11:13:37AM +0100, clime wrote: > On Sun, 1 Nov 2020 at 11:01, Oğuz wrote: > > > > You can use the loadable builtin `setpgid' if you have to. Assuming > > BASH_LOADABLES_BUILTIN is set, this should work: > > > > enable -f setpgid{,} > > { setpgid $BASHPID{,}; a |

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread clime
On Sun, 1 Nov 2020 at 11:01, Oğuz wrote: > > > > 1 Kasım 2020 Pazar tarihinde clime yazdı: > ... >> >> Please, provide a syntactic construct to spawn a new process group (or >> at least there should be some usable command to do that). >> > > You can use the loadable builtin `setpgid' if you have

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread clime
Job control is subideal as I mentioned in the original email. Thanks clime On Sun, 1 Nov 2020 at 09:58, Andreas Schwab wrote: > > On Nov 01 2020, clime wrote: > > > Please, provide a syntactic construct to spawn a new process group (or > > at least there should be some usable command to do

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread Oğuz
1 Kasım 2020 Pazar tarihinde clime yazdı: ... > Please, provide a syntactic construct to spawn a new process group (or > at least there should be some usable command to do that). > > You can use the loadable builtin `setpgid' if you have to. Assuming BASH_LOADABLES_BUILTIN is set, this should

Re: bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread Andreas Schwab
On Nov 01 2020, clime wrote: > Please, provide a syntactic construct to spawn a new process group (or > at least there should be some usable command to do that). Enable job control. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73

Re: read with very small timeout sometime hand on stdin

2020-11-01 Thread felix
On Thu, Oct 29, 2020 at 01:57:33PM +0100, felix wrote: > > I can't reproduce this using the following stripped-down reproducer: Sorry to insist, but... This is not easy because not constant. For this, I wrote a little script tested on several host, then searching for installation that was not

bash: please provide an easy way to spawn a new process group from script

2020-11-01 Thread clime
I was battling this problem now for several hours i wanted to do this: { a | b; } & pid=$! and then later kill -- -$pid to kill all the processes spawned by the pipeline. But this proved to be immensely complicated as no new process group is spawned from within a script (unless set -m which