Function nc::tgkill [−][src]
Expand description
Send a signal to a thread.
let ret = nc::fork();
assert!(ret.is_ok());
let pid = ret.unwrap();
if pid == 0 {
println!("[child] pid: {}", nc::getpid());
let _ret = nc::pause();
} else {
let ret = nc::tgkill(pid, pid, nc::SIGTERM);
assert!(ret.is_ok());
}