diff --git a/tools/sky/serialdump.c b/tools/sky/serialdump.c index 7cc0d0e1e..1fc93ef49 100644 --- a/tools/sky/serialdump.c +++ b/tools/sky/serialdump.c @@ -8,6 +8,7 @@ #include #include #include +#include #define BAUDRATE B115200 #define BAUDRATE_S "115200" @@ -82,9 +83,17 @@ print_hex_line(char *prefix, unsigned char *outbuf, int index) } } +static void +intHandler(int sig) +{ + exit(0); +} + int main(int argc, char **argv) { + signal(SIGINT, intHandler); + struct termios options; fd_set mask, smask; int fd;