From 5e70849b3e594a8c818a517a9e0131f9b202677c Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 10 Jan 2007 12:49:20 +0000 Subject: use non-blocking I/O git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@533 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/atcmd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/util/atcmd.c b/src/util/atcmd.c index 61f7032..2e2c016 100644 --- a/src/util/atcmd.c +++ b/src/util/atcmd.c @@ -2,6 +2,7 @@ #include #include #include +#include #include @@ -24,6 +25,9 @@ int atcmd_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