… | |
… | |
567 | Return the time that the watcher is expected to trigger next. |
567 | Return the time that the watcher is expected to trigger next. |
568 | |
568 | |
569 | SIGNAL WATCHERS - signal me when a signal gets signalled! |
569 | SIGNAL WATCHERS - signal me when a signal gets signalled! |
570 | $w = EV::signal $signal, $callback |
570 | $w = EV::signal $signal, $callback |
571 | $w = EV::signal_ns $signal, $callback |
571 | $w = EV::signal_ns $signal, $callback |
|
|
572 | $w = $loop->signal ($signal, $callback) |
|
|
573 | $w = $loop->signal_ns ($signal, $callback) |
572 | Call the callback when $signal is received (the signal can be |
574 | Call the callback when $signal is received (the signal can be |
573 | specified by number or by name, just as with "kill" or %SIG). |
575 | specified by number or by name, just as with "kill" or %SIG). |
|
|
576 | |
|
|
577 | Only one event loop can grab a given signal - attempting to grab the |
|
|
578 | same signal from two EV loops will crash the program immediately or |
|
|
579 | cause data corruption. |
574 | |
580 | |
575 | EV will grab the signal for the process (the kernel only allows one |
581 | EV will grab the signal for the process (the kernel only allows one |
576 | component to receive a signal at a time) when you start a signal |
582 | component to receive a signal at a time) when you start a signal |
577 | watcher, and removes it again when you stop it. Perl does the same |
583 | watcher, and removes it again when you stop it. Perl does the same |
578 | when you add/remove callbacks to %SIG, so watch out. |
584 | when you add/remove callbacks to %SIG, so watch out. |