Add SIGINT handler for stlink cleanup
authorMichael Pratt <michael@pratt.im>
Wed, 6 Mar 2013 21:15:15 +0000 (16:15 -0500)
committerMichael Pratt <michael@pratt.im>
Wed, 6 Mar 2013 21:34:32 +0000 (16:34 -0500)
commit2216d28452f5e97088fbfd4bd6f6daf187d5e53a
tree4e5fb4733c03465fc03374620250ad577037eb7d
parent4d1ee4d97eb5d282833e542dfb88192240381ed4
Add SIGINT handler for stlink cleanup

SIGINT causes st-util to immediately exit, without closing the open
stlink.  This leaves devices (at least the F4 Discovery) in a state
where they are unable to reset.  st-util could still connect and control
them, but a power cycle was required before they could reset on their
own.

A signal handler is added for SIGINT, which performs cleanup and closing
of the open stlink device, allowing it to function normally on
disconnect.
gdbserver/gdb-server.c