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

Numeric values of signals mean nothing (bug) #1474

Closed
AlexDaniel opened this issue Aug 28, 2017 · 4 comments
Closed

Numeric values of signals mean nothing (bug) #1474

AlexDaniel opened this issue Aug 28, 2017 · 4 comments
Labels
docs Documentation issue (primary issue type) trap

Comments

@AlexDaniel
Copy link
Member

Code:

say +SIGUSR1

Result:

30

… and so I just SIGPWR-ed something that meant to receive SIGUSR1.

“SIGUSR1 can be 30, 10, or 16”. The number you get from Signals enum is not any relevant.

A bit of IRC log: https://irclog.perlgeek.de/perl6/2017-08-28#i_15078223

@AlexDaniel AlexDaniel added the docs Documentation issue (primary issue type) label Aug 28, 2017
@AlexDaniel
Copy link
Member Author

FWIW It feels like this is a rakudo bug that should be fixed, but I don't have enough tuits to defend this position.

@smls
Copy link
Contributor

smls commented Aug 28, 2017

If the enum values can't be made platform-dependent, another idea might be to change it from an Int-based enum to a Str-based enum:

enum Signal (SIGHUP => "SIGHUP", SIGINT => "SIGINT", ...);

Less functionality, but at least no incorrect functionality... :)

@AlexDaniel
Copy link
Member Author

I filed it as a rakudobug anyway: RT #132012.

If we say that it is a bug, should we document it at all?

@AlexDaniel
Copy link
Member Author

If so, then this is not a trap, and we can simply mention it in the docs on Signal. However, Signal is not documented yet.

@AlexDaniel AlexDaniel changed the title Numeric values of signals mean nothing (traps) Numeric values of signals mean nothing (bug) Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type) trap
Projects
None yet
Development

No branches or pull requests

2 participants