X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=anykey.c;h=f11b0d7b031a4a3f94deefad037c861f828cdfc7;hp=1e006b52d3f4ba718d61cbff31b6fb4ac3b4c10b;hb=6df458b71ace93941780153b79b348d4fd99493d;hpb=f1f703bf0dc63e2b6149f4cfba294253991d04f7 diff --git a/anykey.c b/anykey.c index 1e006b5..f11b0d7 100644 --- a/anykey.c +++ b/anykey.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the sigrok-cli project. * * Copyright (C) 2011 Bert Vermeulen * @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include "sigrok-cli.h" #include #ifdef _WIN32 #include @@ -26,8 +27,6 @@ #include #include #include -#include -#include "sigrok-cli.h" #ifdef _WIN32 static HANDLE stdin_handle; @@ -42,6 +41,7 @@ static int received_anykey(int fd, int revents, void *cb_data) (void)revents; (void)cb_data; + sr_session_source_remove(STDIN_FILENO); sr_session_stop(); return TRUE;