Re: Two possible bugs

2021-01-24 Thread Alex Raschi
On Sat, Jan 23, 2021 at 11:22:13PM +, Laurent Bercot wrote:
> 
>  Hi Alex,
> 
> 
> > After the latest updates i noticed that the trap command hangs on exit
> > (all of my scripts using trap hang at exit), something like:
> 
>  Fixed in git.
> 
> 
> > trap: fatal: unable to trap signals: Invalid argument
> 
>  This one is more difficult: it's caused by the fact that the list of
> catchable signals is system-dependent. For my curiosity, what system
> are you testing on? Anyway, it should be fixed in git as well.

Yeah the 'default' one was openbsd specific. Anyway i confirm that with
git version the issue is fixed.

> > if elgetpositionals is not
> > the first command inside a multisubstitute block the following happens:
> 
>  The bug manifests if it's the last command, not "not the first".
>  Fixed in git as well.
> 
>  I'll cut a bugfix release early on next week.
>  Thanks for the reports!
> 
> --
>  Laurent
> 

Alex


Re: Two possible bugs

2021-01-23 Thread Laurent Bercot



 Hi Alex,



After the latest updates i noticed that the trap command hangs on exit
(all of my scripts using trap hang at exit), something like:


 Fixed in git.



trap: fatal: unable to trap signals: Invalid argument


 This one is more difficult: it's caused by the fact that the list of
catchable signals is system-dependent. For my curiosity, what system
are you testing on? Anyway, it should be fixed in git as well.



if elgetpositionals is not
the first command inside a multisubstitute block the following happens:


 The bug manifests if it's the last command, not "not the first".
 Fixed in git as well.

 I'll cut a bugfix release early on next week.
 Thanks for the reports!

--
 Laurent



Two possible bugs

2021-01-23 Thread Alex Raschi
Hi,

After the latest updates i noticed that the trap command hangs on exit
(all of my scripts using trap hang at exit), something like:

execlineb -c 'if { trap { INT { echo int } } echo begin } echo end'

Never prints 'end', this happens on alpine (skalibs-2.10.0.1 /
execline-2.7.0.0) and on openbsd (skalibs-2.10.0.0/execline-2.7.0.0).
The same happens with SIGTERM, quit and 1 instead of INT. While testing
this i noticed also that using 'default' instead of INT with the above
command leads to:

trap: fatal: unable to trap signals: Invalid argument

I took a quick look at the new options and i might be wrong for this
one.

The other one concerns elgetpositionals and multisubstitute. This is not
related to the latest release, it was there way before but i completely
forgot about this one until now. Basically if elgetpositionals is not
the first command inside a multisubstitute block the following happens:

execlineb -c 'multisubstitute { define hi hello elgetpositionals } echo ${hi} 
${@}' test
multisubstitute: fatal: syntax error at directive elgetpositionals

While this one works:

execlineb -c 'multisubstitute { elgetpositionals define hi hello } echo ${hi} 
${@}' test
hello test

I haven't found a corrispondence in the documentation and/or in the
mailing lists so i thought of reporting it. I haven't tested the git
version, ignore this if it is already fixed.

Thanks in advance!

Alex