summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/shell.c4
1 files changed, 4 insertions, 0 deletions
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 <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <fcntl.h>
#include <libgsmd/libgsmd.h>
#include <libgsmd/voicecall.h>
@@ -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) {
personal git repositories of Harald Welte. Your mileage may vary