diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-01-10 12:49:20 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-01-10 12:49:20 +0000 |
commit | 5e70849b3e594a8c818a517a9e0131f9b202677c (patch) | |
tree | 9c5aeb7e0a8c6374912273a39a2f2f16aeaf6d94 /src | |
parent | 031686b50aecd37ef1f0832fb64b2415e5e4981e (diff) |
use non-blocking I/O
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@533 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r-- | src/util/atcmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 <string.h> #include <stdlib.h> #include <unistd.h> +#include <fcntl.h> #include <libgsmd/libgsmd.h> @@ -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) { |