Skip to content

Instantly share code, notes, and snippets.

@anatg
Created February 7, 2014 06:50
Show Gist options
  • Save anatg/8858327 to your computer and use it in GitHub Desktop.
Save anatg/8858327 to your computer and use it in GitHub Desktop.
Rust error:
rustc: /build/buildd/rust-0.9-0.9/src/llvm/lib/IR/Instructions.cpp:549: void llvm::InvokeInst::init(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Invoking a function with a bad signature!"' failed.
Aborted (core dumped)
use std::io::signal::{Listener, Interrupt};
fn main() {
let mut listener = Listener::new();
listener.register(Interrupt);
spawn({
loop {
match listener.port.recv() {
Interrupt => println!("Got Interrupt'ed"),
_ => (),
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment