Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply.merge and signals ( signal(SIGTERM).merge(signal(SIGINT)) ) #6490

Closed
p6rt opened this issue Sep 2, 2017 · 13 comments
Closed

Supply.merge and signals ( signal(SIGTERM).merge(signal(SIGINT)) ) #6490

p6rt opened this issue Sep 2, 2017 · 13 comments

Comments

@p6rt
Copy link

p6rt commented Sep 2, 2017

Migrated from rt.perl.org#132016 (status was 'resolved')

Searchable as RT132016$

@p6rt
Copy link
Author

p6rt commented Sep 16, 2014

From @lizmat

16​:48​:20] <lizmat> jnthn​: sanity check​: we should allow more than one signal to be tapped at a time, right ?
[16​:49​:10] <jnthn> lizmat​: aye
[16​:49​:32] <lizmat> putting this in a file​:
[16​:49​:34] <lizmat> signal(SIGHUP).act​: -> { }; signal(SIGINT).act​: -> { }; sleep 5;
[16​:49​:50] <lizmat> running it and pressing CTRL-c gives a very strange backtrace
[16​:50​:03] <lizmat> Unhandled exception in code scheduled on thread 4527849472
[16​:50​:03] <lizmat> Cannot call 'postcircumfix​:<[ ]>'; none of these signatures match​:
[16​:50​:22] <lizmat> no line numbers, not even with --ll-exception
[16​:51​:13] <jnthn> Odd
[16​:52​:06] <lizmat> rakudobug it?
[16​:54​:14] <jnthn> yeah

@p6rt
Copy link
Author

p6rt commented Sep 2, 2017

From @AlexDaniel

Command​:
# run it and then send SIGINT (e.g. with Ctrl+C)
perl6 -e 'react whenever signal(SIGINT).merge(signal(SIGTERM)) { say ‘hey!’; exit 0 }'

Result​:
hey!

Command​:
# run it and then send SIGINT (e.g. with Ctrl+C)
perl6 -e 'react whenever signal(SIGTERM).merge(signal(SIGINT)) { say ‘hey!’; exit 0 }'

Result​:
Unhandled exception in code scheduled on thread 10
Cannot resolve caller postcircumfix​:<[ ]>(Mu, Int); none of these signatures match​:
  (\SELF, Any​:U $type, |c is raw)
  (\SELF, int $pos)
  (\SELF, int $pos, Mu \assignee)
  (\SELF, int $pos, Mu :$BIND! is raw)
  (\SELF, int $pos, :$delete!, *%other)
  (\SELF, int $pos, :$exists!, *%other)
  (\SELF, int $pos, :$kv!, *%other)
  (\SELF, int $pos, :$p!, *%other)
  (\SELF, int $pos, :$k!, *%other)
  (\SELF, int $pos, :$v!, *%other)
  (\SELF, Int​:D $pos)
  (\SELF, Int​:D $pos, Mu \assignee)
  (\SELF, Int​:D $pos, Mu :$BIND! is raw)
  (\SELF, Int​:D $pos, :$delete!, *%other)
  (\SELF, Int​:D $pos, :$exists!, *%other)
  (\SELF, Int​:D $pos, :$kv!, *%other)
  (\SELF, Int​:D $pos, :$p!, *%other)
  (\SELF, Int​:D $pos, :$k!, *%other)
  (\SELF, Int​:D $pos, :$v!, *%other)
  (\SELF, Any​:D \pos)
  (\SELF, Any​:D \pos, Mu \assignee)
  (\SELF, Any​:D \pos, Mu :$BIND! is raw)
  (\SELF, Any​:D \pos, :$delete!, *%other)
  (\SELF, Any​:D \pos, :$exists!, *%other)
  (\SELF, Any​:D \pos, :$kv!, *%other)
  (\SELF, Any​:D \pos, :$p!, *%other)
  (\SELF, Any​:D \pos, :$k!, *%other)
  (\SELF, Any​:D \pos, :$v!, *%other)
  (\SELF, Iterable​:D \pos)
  (\SELF, Iterable​:D \pos, Mu \val)
  (\SELF, Iterable​:D \pos, :$BIND!)
  (\SELF, Iterable​:D \pos, :$delete!, *%other)
  (\SELF, Iterable​:D \pos, :$exists!, *%other)
  (\SELF, Iterable​:D \pos, :$kv!, *%other)
  (\SELF, Iterable​:D \pos, :$p!, *%other)
  (\SELF, Iterable​:D \pos, :$k!, *%other)
  (\SELF, Iterable​:D \pos, :$v!, *%other)
  (\SELF, Callable​:D $block)
  (\SELF, Callable​:D $block, Mu \assignee)
  (\SELF, Callable​:D $block, :$BIND!)
  (\SELF, Callable​:D $block, :$delete!, *%other)
  (\SELF, Callable​:D $block, :$exists!, *%other)
  (\SELF, Callable​:D $block, :$kv!, *%other)
  (\SELF, Callable​:D $block, :$p!, *%other)
  (\SELF, Callable​:D $block, :$k!, *%other)
  (\SELF, Callable​:D $block, :$v!, *%other)
  (\SELF, Whatever​:D)
  (\SELF, Whatever​:D, Mu \assignee)
  (\SELF, Whatever​:D, :$BIND!)
  (\SELF, Whatever​:D, :$delete!, *%other)
  (\SELF, Whatever​:D, :$exists!, *%other)
  (\SELF, Whatever​:D, :$kv!, *%other)
  (\SELF, Whatever​:D, :$p!, *%other)
  (\SELF, Whatever​:D, :$k!, *%other)
  (\SELF, Whatever​:D, :$v!, *%other)
  (\SELF, HyperWhatever​:D, *%adv)
  (\SELF, HyperWhatever​:D, Mu \assignee)
  (\SELF, :$BIND!)
  (\SELF, :$delete!, *%other)
  (\SELF, :$exists!, *%other)
  (\SELF, :$kv!, *%other)
  (\SELF, :$p!, *%other)
  (\SELF, :$k!, *%other)
  (\SELF, :$v!, *%other)
  (\SELF, *%other)

I think there's something wrong.

@p6rt
Copy link
Author

p6rt commented Sep 2, 2017

From @AlexDaniel

Revert this commit when the ticket is resolved​: Raku/doc@7008429

(possibly with a note that it only works since rakudo 20XX.XX)

On 2017-09-01 20​:15​:07, alex.jakimenko@​gmail.com wrote​:

Command​:
# run it and then send SIGINT (e.g. with Ctrl+C)
perl6 -e 'react whenever signal(SIGINT).merge(signal(SIGTERM)) { say
‘hey!’; exit 0 }'

Result​:
hey!

Command​:
# run it and then send SIGINT (e.g. with Ctrl+C)
perl6 -e 'react whenever signal(SIGTERM).merge(signal(SIGINT)) { say
‘hey!’; exit 0 }'

Result​:
Unhandled exception in code scheduled on thread 10
Cannot resolve caller postcircumfix​:<[ ]>(Mu, Int); none of these
signatures match​:
(\SELF, Any​:U $type, |c is raw)
(\SELF, int $pos)
(\SELF, int $pos, Mu \assignee)
(\SELF, int $pos, Mu :$BIND! is raw)
(\SELF, int $pos, :$delete!, *%other)
(\SELF, int $pos, :$exists!, *%other)
(\SELF, int $pos, :$kv!, *%other)
(\SELF, int $pos, :$p!, *%other)
(\SELF, int $pos, :$k!, *%other)
(\SELF, int $pos, :$v!, *%other)
(\SELF, Int​:D $pos)
(\SELF, Int​:D $pos, Mu \assignee)
(\SELF, Int​:D $pos, Mu :$BIND! is raw)
(\SELF, Int​:D $pos, :$delete!, *%other)
(\SELF, Int​:D $pos, :$exists!, *%other)
(\SELF, Int​:D $pos, :$kv!, *%other)
(\SELF, Int​:D $pos, :$p!, *%other)
(\SELF, Int​:D $pos, :$k!, *%other)
(\SELF, Int​:D $pos, :$v!, *%other)
(\SELF, Any​:D \pos)
(\SELF, Any​:D \pos, Mu \assignee)
(\SELF, Any​:D \pos, Mu :$BIND! is raw)
(\SELF, Any​:D \pos, :$delete!, *%other)
(\SELF, Any​:D \pos, :$exists!, *%other)
(\SELF, Any​:D \pos, :$kv!, *%other)
(\SELF, Any​:D \pos, :$p!, *%other)
(\SELF, Any​:D \pos, :$k!, *%other)
(\SELF, Any​:D \pos, :$v!, *%other)
(\SELF, Iterable​:D \pos)
(\SELF, Iterable​:D \pos, Mu \val)
(\SELF, Iterable​:D \pos, :$BIND!)
(\SELF, Iterable​:D \pos, :$delete!, *%other)
(\SELF, Iterable​:D \pos, :$exists!, *%other)
(\SELF, Iterable​:D \pos, :$kv!, *%other)
(\SELF, Iterable​:D \pos, :$p!, *%other)
(\SELF, Iterable​:D \pos, :$k!, *%other)
(\SELF, Iterable​:D \pos, :$v!, *%other)
(\SELF, Callable​:D $block)
(\SELF, Callable​:D $block, Mu \assignee)
(\SELF, Callable​:D $block, :$BIND!)
(\SELF, Callable​:D $block, :$delete!, *%other)
(\SELF, Callable​:D $block, :$exists!, *%other)
(\SELF, Callable​:D $block, :$kv!, *%other)
(\SELF, Callable​:D $block, :$p!, *%other)
(\SELF, Callable​:D $block, :$k!, *%other)
(\SELF, Callable​:D $block, :$v!, *%other)
(\SELF, Whatever​:D)
(\SELF, Whatever​:D, Mu \assignee)
(\SELF, Whatever​:D, :$BIND!)
(\SELF, Whatever​:D, :$delete!, *%other)
(\SELF, Whatever​:D, :$exists!, *%other)
(\SELF, Whatever​:D, :$kv!, *%other)
(\SELF, Whatever​:D, :$p!, *%other)
(\SELF, Whatever​:D, :$k!, *%other)
(\SELF, Whatever​:D, :$v!, *%other)
(\SELF, HyperWhatever​:D, *%adv)
(\SELF, HyperWhatever​:D, Mu \assignee)
(\SELF, :$BIND!)
(\SELF, :$delete!, *%other)
(\SELF, :$exists!, *%other)
(\SELF, :$kv!, *%other)
(\SELF, :$p!, *%other)
(\SELF, :$k!, *%other)
(\SELF, :$v!, *%other)
(\SELF, *%other)

I think there's something wrong.

@p6rt
Copy link
Author

p6rt commented Sep 4, 2017

From @jnthn

On Fri, 01 Sep 2017 20​:15​:07 -0700, alex.jakimenko@​gmail.com wrote​:

Command​:
# run it and then send SIGINT (e.g. with Ctrl+C)
perl6 -e 'react whenever signal(SIGINT).merge(signal(SIGTERM)) { say
‘hey!’; exit 0 }'

Result​:
hey!

Command​:
# run it and then send SIGINT (e.g. with Ctrl+C)
perl6 -e 'react whenever signal(SIGTERM).merge(signal(SIGINT)) { say
‘hey!’; exit 0 }'

Result​:
Unhandled exception in code scheduled on thread 10
Cannot resolve caller postcircumfix​:<[ ]>(Mu, Int); none of these
signatures match​:
(\SELF, Any​:U $type, |c is raw)
(\SELF, int $pos)
(\SELF, int $pos, Mu \assignee)
(\SELF, int $pos, Mu :$BIND! is raw)
(\SELF, int $pos, :$delete!, *%other)
(\SELF, int $pos, :$exists!, *%other)
(\SELF, int $pos, :$kv!, *%other)
(\SELF, int $pos, :$p!, *%other)
(\SELF, int $pos, :$k!, *%other)
(\SELF, int $pos, :$v!, *%other)
(\SELF, Int​:D $pos)
(\SELF, Int​:D $pos, Mu \assignee)
(\SELF, Int​:D $pos, Mu :$BIND! is raw)
(\SELF, Int​:D $pos, :$delete!, *%other)
(\SELF, Int​:D $pos, :$exists!, *%other)
(\SELF, Int​:D $pos, :$kv!, *%other)
(\SELF, Int​:D $pos, :$p!, *%other)
(\SELF, Int​:D $pos, :$k!, *%other)
(\SELF, Int​:D $pos, :$v!, *%other)
(\SELF, Any​:D \pos)
(\SELF, Any​:D \pos, Mu \assignee)
(\SELF, Any​:D \pos, Mu :$BIND! is raw)
(\SELF, Any​:D \pos, :$delete!, *%other)
(\SELF, Any​:D \pos, :$exists!, *%other)
(\SELF, Any​:D \pos, :$kv!, *%other)
(\SELF, Any​:D \pos, :$p!, *%other)
(\SELF, Any​:D \pos, :$k!, *%other)
(\SELF, Any​:D \pos, :$v!, *%other)
(\SELF, Iterable​:D \pos)
(\SELF, Iterable​:D \pos, Mu \val)
(\SELF, Iterable​:D \pos, :$BIND!)
(\SELF, Iterable​:D \pos, :$delete!, *%other)
(\SELF, Iterable​:D \pos, :$exists!, *%other)
(\SELF, Iterable​:D \pos, :$kv!, *%other)
(\SELF, Iterable​:D \pos, :$p!, *%other)
(\SELF, Iterable​:D \pos, :$k!, *%other)
(\SELF, Iterable​:D \pos, :$v!, *%other)
(\SELF, Callable​:D $block)
(\SELF, Callable​:D $block, Mu \assignee)
(\SELF, Callable​:D $block, :$BIND!)
(\SELF, Callable​:D $block, :$delete!, *%other)
(\SELF, Callable​:D $block, :$exists!, *%other)
(\SELF, Callable​:D $block, :$kv!, *%other)
(\SELF, Callable​:D $block, :$p!, *%other)
(\SELF, Callable​:D $block, :$k!, *%other)
(\SELF, Callable​:D $block, :$v!, *%other)
(\SELF, Whatever​:D)
(\SELF, Whatever​:D, Mu \assignee)
(\SELF, Whatever​:D, :$BIND!)
(\SELF, Whatever​:D, :$delete!, *%other)
(\SELF, Whatever​:D, :$exists!, *%other)
(\SELF, Whatever​:D, :$kv!, *%other)
(\SELF, Whatever​:D, :$p!, *%other)
(\SELF, Whatever​:D, :$k!, *%other)
(\SELF, Whatever​:D, :$v!, *%other)
(\SELF, HyperWhatever​:D, *%adv)
(\SELF, HyperWhatever​:D, Mu \assignee)
(\SELF, :$BIND!)
(\SELF, :$delete!, *%other)
(\SELF, :$exists!, *%other)
(\SELF, :$kv!, *%other)
(\SELF, :$p!, *%other)
(\SELF, :$k!, *%other)
(\SELF, :$v!, *%other)
(\SELF, *%other)

I think there's something wrong.

Fixed in Rakudo commits 1f411693bd and 13b6a33c20. Tagging as test needed.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 4, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

From @jnthn

On Tue, 16 Sep 2014 07​:51​:34 -0700, elizabeth wrote​:

16​:48​:20] <lizmat> jnthn​: sanity check​: we should allow more than
one signal to be tapped at a time, right ?
[16​:49​:10] <jnthn> lizmat​: aye
[16​:49​:32] <lizmat> putting this in a file​:
[16​:49​:34] <lizmat> signal(SIGHUP).act​: -> { };
signal(SIGINT).act​: -> { }; sleep 5;
[16​:49​:50] <lizmat> running it and pressing CTRL-c gives a very
strange backtrace
[16​:50​:03] <lizmat> Unhandled exception in code scheduled on
thread 4527849472
[16​:50​:03] <lizmat> Cannot call 'postcircumfix​:<[ ]>'; none of
these signatures match​:
[16​:50​:22] <lizmat> no line numbers, not even with --ll-exception
[16​:51​:13] <jnthn> Odd
[16​:52​:06] <lizmat> rakudobug it?
[16​:54​:14] <jnthn> yeah

This was duplicated in RT #​132016, which was recently fixed. Resolving.

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

@jnthn - Status changed from 'open' to 'resolved'

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

@smls - Status changed from 'open' to 'resolved'

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

@AlexDaniel - Status changed from 'resolved' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 12, 2017

From @AlexDaniel

Sorry, it was marked as “resolved”, but I don't see any mention of tests.

On 2014-09-16 07​:51​:34, elizabeth wrote​:

16​:48​:20] <lizmat> jnthn​: sanity check​: we should allow more than
one signal to be tapped at a time, right ?
[16​:49​:10] <jnthn> lizmat​: aye
[16​:49​:32] <lizmat> putting this in a file​:
[16​:49​:34] <lizmat> signal(SIGHUP).act​: -> { };
signal(SIGINT).act​: -> { }; sleep 5;
[16​:49​:50] <lizmat> running it and pressing CTRL-c gives a very
strange backtrace
[16​:50​:03] <lizmat> Unhandled exception in code scheduled on
thread 4527849472
[16​:50​:03] <lizmat> Cannot call 'postcircumfix​:<[ ]>'; none of
these signatures match​:
[16​:50​:22] <lizmat> no line numbers, not even with --ll-exception
[16​:51​:13] <jnthn> Odd
[16​:52​:06] <lizmat> rakudobug it?
[16​:54​:14] <jnthn> yeah

@p6rt
Copy link
Author

p6rt commented Oct 12, 2017

From @zoffixznet

Tests in Raku/roast@016aa10f8e

@p6rt
Copy link
Author

p6rt commented Oct 12, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 12, 2017
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant