Skip Menu |
Report information
Id: 132012
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Numeric values of signals are wrong (say +SIGUSR1)
Download (untitled) / with headers
text/plain 229b
Code: say +SIGUSR1 Result: 30 However, on my system SIGUSR1 is *not* 30 (it is 10). I guess rakudo should try harder to find proper values of the system it runs on. See this doc issue: https://github.com/perl6/doc/issues/1474
We now have a note in the docs about this. When fixed, change the docs accordingly (*maybe* saying that versions before X are known to have a bug).

https://github.com/perl6/doc/commit/39e3efc08d

See IRC discussion: https://irclog.perlgeek.de/perl6/2017-09-01#i_15103501
On 2017-09-01 03:33:34, alex.jakimenko@gmail.com wrote:
Show quoted text
> Code:
> say +SIGUSR1
>
> Result:
> 30
>
>
> However, on my system SIGUSR1 is *not* 30 (it is 10). I guess rakudo
> should try harder to find proper values of the system it runs on.
>
> See this doc issue: https://github.com/perl6/doc/issues/1474


There's something regression-ish about it.

Code:
say $*KERNEL.signal: SIGUSR1

¦79b8ab9d3f^:

10

¦79b8ab9d3f:
30


See (2017-06-02) https://github.com/rakudo/rakudo/commit/79b8ab9d3f9a5499e8a7859f34b4499fb352ac13

On 2017-09-01 15:39:42, alex.jakimenko@gmail.com wrote:
Show quoted text
> We now have a note in the docs about this. When fixed, change the docs
> accordingly (*maybe* saying that versions before X are known to have a bug).
>
> https://github.com/perl6/doc/commit/39e3efc08d
>
> See IRC discussion: https://irclog.perlgeek.de/perl6/2017-09-01#i_15103501
> On 2017-09-01 03:33:34, alex.jakimenko@gmail.com wrote:
> > Code:
> > say +SIGUSR1
> >
> > Result:
> > 30
> >
> >
> > However, on my system SIGUSR1 is *not* 30 (it is 10). I guess rakudo
> > should try harder to find proper values of the system it runs on.
> >
> > See this doc issue: https://github.com/perl6/doc/issues/1474


RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.4k
On Fri, 13 Oct 2017 23:34:51 -0700, alex.jakimenko@gmail.com wrote: Show quoted text
> There's something regression-ish about it. > > Code: > say $*KERNEL.signal: SIGUSR1 > > ¦79b8ab9d3f^: > > 10 > > ¦79b8ab9d3f: > 30 > > > See (2017-06-02) > https://github.com/rakudo/rakudo/commit/79b8ab9d3f9a5499e8a7859f34b4499fb352ac13 > > On 2017-09-01 15:39:42, alex.jakimenko@gmail.com wrote:
> > We now have a note in the docs about this. When fixed, change the > > docs > > accordingly (*maybe* saying that versions before X are known to have > > a bug). > > > > https://github.com/perl6/doc/commit/39e3efc08d > > > > See IRC discussion: https://irclog.perlgeek.de/perl6/2017-09- > > 01#i_15103501 > > On 2017-09-01 03:33:34, alex.jakimenko@gmail.com wrote:
> > > Code: > > > say +SIGUSR1 > > > > > > Result: > > > 30 > > > > > > > > > However, on my system SIGUSR1 is *not* 30 (it is 10). I guess > > > rakudo > > > should try harder to find proper values of the system it runs on. > > > > > > See this doc issue: https://github.com/perl6/doc/issues/1474
Something fishy going on with the Signals enum. If that's fixed then the regression you pointed out will be fixed as well, as the new method simply uses enum's `.value` to get the signal number: <Zoffix__> c: 79b8ab9d3f^,79b8ab9d3f,HEAD say SIGUSR1.Numeric; say SIGUSR1.value; say $*KERNEL.signal: SIGUSR1 <committable6> Zoffix__, ¦79b8ab9d3f^: «30␤30␤10» ¦79b8ab9,HEAD(cc6c055): «30␤30␤30»
Someone asked why this issue is ANNOYING, here's some clafirication.

Basically, most of the stuff said said in linked comment applies here as well: https://rt.perl.org/Ticket/Display.html?id=131003#txn-1496218

In other words, *some* signals have correct values and you don't notice the issue right away.  Also, there's practically no workaround, unless you start hard-coding the values. I guess hard-coding can be counted as a workaround, except that it won't work on all systems. And this issue is very likely to be noticed by anybody using SIGUSR1. I think that's enough to justify the tag.

FWIW, I've also made a note about this issue in the docs, to prevent people from wasting their time on a known issue: https://docs.perl6.org/type/Supply#sub_signal


On 2017-09-01 03:33:34, alex.jakimenko@gmail.com wrote:
Show quoted text
> Code:
> say +SIGUSR1
>
> Result:
> 30
>
>
> However, on my system SIGUSR1 is *not* 30 (it is 10). I guess rakudo
> should try harder to find proper values of the system it runs on.
>
> See this doc issue: https://github.com/perl6/doc/issues/1474


Subject: Numeric values of signals are wrong (say +SIGUSR1)
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 706b
On Sat, 14 Oct 2017 08:29:50 -0700, cpan@zoffix.com wrote: Show quoted text
> Something fishy going on with the Signals enum. If that's fixed then > the > regression you pointed out will be fixed as well, as the new method > simply > uses enum's `.value` to get the signal number: > > <Zoffix__> c: 79b8ab9d3f^,79b8ab9d3f,HEAD say SIGUSR1.Numeric; say > SIGUSR1.value; say $*KERNEL.signal: SIGUSR1 > <committable6> Zoffix__, ¦79b8ab9d3f^: «30␤30␤10» > ¦79b8ab9,HEAD(cc6c055): «30␤30␤30»
There's also a failing spectest on Windows that expects both of these to give same value (on and Linux, they do): C:\rakudo>perl6 -e "$*KERNEL.signal('SIGHUP').say" 3 C:\rakudo>perl6 -e "$*KERNEL.signal(SIGHUP).say" 1


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org