diff options
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) { |