File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -599,12 +599,16 @@ the supply. For example:
599
599
600
600
signal(SIGINT).tap( { say "Thank you for your attention"; exit 0 } );
601
601
602
- would catch Control-C, thank you, and then exit. The list of supported
603
- signals can be found by checking Signal::.keys (as you would any enum).
604
- To go from a signal number to Signal, you can do something like this:
602
+ would catch Control-C, thank you, and then exit.
603
+
604
+ To go from a signal number to a Signal, you can do something like this:
605
605
606
606
signal(Signal(2)).tap( -> $sig { say "Received signal: $sig" } );
607
607
608
+ The list of supported signals can be found by checking Signal::.keys (as
609
+ you would any enum). For more details on how enums work see
610
+ L < enum|/language/typesystem#enum > .
611
+
608
612
= head2 method IO::Notification.watch-path
609
613
610
614
= for code :skip-test
You can’t perform that action at this time.
0 commit comments