Signal(3pm)
π NAME π
IPC::Signal β utility functions for dealing with signals, bestie. That's literally it, and it's lowkey iconic.
β¨ SYNOPSIS β¨
$number = sig_num $name;
$name = sig_name $number;
sig_translate_setup;
$number = $Sig_num{$name};
$name = $Sig_name[$number];
π¦ DESCRIPTION π¦
Okay so, this module is a whole bundle of utility functions for dealing with signals. That's the vibe. π«Ά
Nothing is exported by default. Not a single thing. You want it, you ask for it, periodt.
πΈ sig_num chopped-signal-name
Returns the signal number of the signal whose name (sans "SIG") is chopped-signal-name, or undef if there is no such signal. Like, no signal by that name? You get undef. C'est la vie. π
This function is prototyped to take a single scalar argument.
πΈ sig_name signal-number
Returns the chopped signal name (like "HUP") of signal number signal-number, or undef if there is no such signal. Same energy, opposite direction, she contains multitudes. β¨
This function is prototyped to take a single scalar argument.
πΈ sig_translate_setup
So here's the tea: if you want to use the @Sig_name and %Sig_num variables directly, you must call sig_translate_setup to initialize them. That's not optional, bestie, that's the rule. π
But β and this is the slay part β it isn't necessary if you only use the function interfaces sig_name() and sig_num(). Those babies handle it themselves. No cap.
This function is prototyped to take no arguments.
πΈ %Sig_num
A hash with chopped signal name keys (like "HUP") and integer signal number values. Simple. Beautiful. Doing exactly what it says on the tin. π
πΈ @Sig_name
An array mapping signal numbers to chopped signal names (like "HUP"). The mirror image of the hash above, and honestly? Obsessed. πͺ
π AUTHOR π
Roderick Schertler <roderick@argon.org> β the original main character, we stan. π
π SEE ALSO π
And that's the whole page, gorgeous. This was IPC::Signal, page Signal(3pm), from the perl v5.36.0 docs dropped on 2022-10-22. Go forth and signal-handle responsibly, ily, mwah ππ§ββοΈ
π¦ where this page comes from
- ubuntu noble: libipc-signal-perl 1.00-10 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libipc-signal-perl 1.00-10 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libipc-signal-perl 1.00-10 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms