Handle SIGINT

Handle SIGINT by stopping the traced program and then displaying a
prompt to the user for commands. If the traced process is not running,
this is a noop.

Closes #30
This commit is contained in:
Derek Parker
2015-01-09 16:24:33 -06:00
parent 6acb912a0c
commit bc39ddfbbc
3 changed files with 99 additions and 40 deletions

View File

@ -264,7 +264,7 @@ func (thread *ThreadContext) continueToReturnAddress(pc uint64, fde *frame.Frame
// change the goroutine context on us, we there is
// no guarantee that waiting on this tid will ever
// return.
wpid, _, err := trapWait(thread.Process, -1, 0)
wpid, _, err := trapWait(thread.Process, -1)
if err != nil {
return err
}