conformal/btcsim — pull request #6 by tuxcanfly (2014-06-25 19:06:24+00:00)
Title: handle ctrl+c and cleanup before exit

Since we need to cleanup actors and miner both with or without panic, I thought it'd be best to just use `defer` without `recover`. I tested this and found that panic or not, defer cleans up as expected. If I'm missing some case where `recover` is required, let me know.

Ctrl+C was being propagated to any spawned processes so strictly speaking the handler here superfluous. Just thought it would be a good practice to not rely on the caller (`os/exec`?) and clean it up anyway.