From 031686b50aecd37ef1f0832fb64b2415e5e4981e Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 10 Jan 2007 12:47:01 +0000 Subject: use non-blocking i/o to prevent missing of events git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@532 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/shell.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util') diff --git a/src/util/shell.c b/src/util/shell.c index 2875758..b90cd19 100644 --- a/src/util/shell.c +++ b/src/util/shell.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -37,6 +38,9 @@ int shell_main(struct lgsm_handle *lgsmh) lgsm_register_handler(lgsmh, GSMD_MSG_PASSTHROUGH, &pt_msghandler); + fcntl(0, F_SETFD, O_NONBLOCK); + fcntl(lgsm_fd(lgsmh), F_SETFD, O_NONBLOCK); + FD_ZERO(&readset); while (1) { -- cgit v1.2.3