Send a signal to a process
Author: stmuk
You want to send a signal to a process on a UNIX-like OS
Source code: 16-14-send-signal.p6
use v6; use NativeCall; sub kill(int32, int32) returns int32 is native { ... } signal(SIGHUP).tap( {say "caught HUP"}); kill($*PID, Signal::SIGHUP); sleep 2;