Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-04 Thread H.-Dirk Schmitt
On Mo, 2017-12-04 at 16:49 -0500, Chet Ramey wrote: > The thing is, bash doesn't "implement" its regular expressions, per > se. > Bash uses the Posix standard library functions (regcomp/regexec) if > they > are available in the C library when it's configured and built. I'm > not > wild about

Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-04 Thread Chet Ramey
On 12/4/17 1:42 PM, H.-Dirk Schmitt wrote: > From the 2 replies I unterstand that the implementation in bash is > correct due to the „official“ standard. > > For myself I have solved the issue in my script - but the regular > expression I developed for my problem are without the 'non-greedy' >

Re: Bash: sleep execution issue with bash loadable builtins

2017-12-04 Thread Ángel
On 2017-12-04 at 16:38 +0530, Thiruvadi Rajaraman wrote: > Hi Chester, > > Based on your review comments and suggestions about the earlier fixes, > reworked on the fix with pselect() > to block the signal. > Blocked the SIGCHLD signal using sigprocmask(). > > Attached the reworked fix patch for

Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-04 Thread H.-Dirk Schmitt
>From the 2 replies I unterstand that the implementation in bash is correct due to the „official“ standard. For myself I have solved the issue in my script - but the regular expression I developed for my problem are without the 'non-greedy' operator more difficult to read and maintain. From that

Bash: Issue with 'sleep' execution in bash loadable builtins

2017-12-04 Thread Thiruvadi Rajaraman
Hi, Found the issue with sleep execution with bash loadable builtins which failed to sleep for specified amount of time. The rootcause for the sleep execution failure found with select() function (in lib/sh/ufunc.c) which is interrupted by SIGCHLD signal. Followings are host, reproduction

Re: some problems with scope of fds in process substitution

2017-12-04 Thread Stephane Chazelas
2017-12-04 08:46:24 -0500, Chet Ramey: [...] > Bash-4.4 allows you to wait for the last process substitution, since the > pid appears in $!, like ksh93. Thanks, I hadn't noticed it had changed in 4.4 One major differnce with ksh93 though is that it won't work with cmd | tee >(cmd2) unless you

Re: some problems with scope of fds in process substitution

2017-12-04 Thread Chet Ramey
On 12/3/17 6:07 PM, Stephane Chazelas wrote: > 2017-12-03 17:31:00 -0500, Chet Ramey: >> On 12/1/17 2:00 PM, Stephane Chazelas wrote: >> >>> Also, there's a lot of problems reported at >>> unix.stackexchange.com at least that are caused by bash not >>> waiting for the processes started by process

Re: Bash: sleep execution issue with bash loadable builtins

2017-12-04 Thread Eduardo Bustamante
On Mon, Dec 4, 2017 at 5:08 AM, Thiruvadi Rajaraman wrote: > Hi Chester, > > Based on your review comments and suggestions about the earlier fixes, > reworked on the fix with pselect() > to block the signal. FYI, Chet pushed a few changes related to this in commits

Re: Bash: sleep execution issue with bash loadable builtins

2017-12-04 Thread Thiruvadi Rajaraman
Hi Chester, Based on your review comments and suggestions about the earlier fixes, reworked on the fix with pselect() to block the signal. Blocked the SIGCHLD signal using sigprocmask(). Attached the reworked fix patch for your kind reference. Please kindly review the patch and suggest your