summaryrefslogtreecommitdiff
path: root/recipes/bluez/bluez-utils/handle-eintr.patch
blob: effe5d96969909b930a33a1d648bd37d0e0b360e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- bluez-utils-3.9.org/tools/hciattach.c	2007-01-28 20:16:48.000000000 +0000
+++ bluez-utils-3.9/tools/hciattach.c	2007-02-12 16:50:49.000000000 +0000
@@ -1135,7 +1256,7 @@
 int main(int argc, char *argv[])
 {
 	struct uart_t *u = NULL;
-	int detach, printpid, opt, i, n, ld;
+	int detach, printpid, opt, i, n, ld, err;
 	int to = 5; 
 	int init_speed = 0;
 	int send_break = 0;
@@ -1286,7 +1414,10 @@
 
 	while (!__io_canceled) {
 		p.revents = 0;
-		if (poll(&p, 1, 500))
+		err = poll(&p, 1, 500);
+		if (err < 0 && errno == EINTR)
+			continue;
+		if (err)
 			break;
 	}