projects
/
oweals
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4534209
)
fix SIGINT handling
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 6 Feb 2011 01:19:54 +0000
(
02:19
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 6 Feb 2011 01:19:54 +0000
(
02:19
+0100)
libubus.c
patch
|
blob
|
history
ubus-example.c
patch
|
blob
|
history
diff --git
a/libubus.c
b/libubus.c
index 66de478e805bce56bc7bd9e56ea672b5928c0541..8749d7ca0d7d35c57c20dccef9b6fbd7e55598d7 100644
(file)
--- a/
libubus.c
+++ b/
libubus.c
@@
-124,6
+124,8
@@
static bool recv_retry(int fd, struct iovec *iov, bool wait)
bytes = read(fd, iov->iov_base, iov->iov_len);
if (bytes < 0) {
bytes = 0;
+ if (uloop_cancelled)
+ return false;
if (errno == EINTR)
continue;
diff --git
a/ubus-example.c
b/ubus-example.c
index d2e2288e4c2e068e64e3df9e25896b31e32c07ad..f84f2b46da1142a2e1e6326edf104a8b29eeaeee 100644
(file)
--- a/
ubus-example.c
+++ b/
ubus-example.c
@@
-98,6
+98,7
@@
int main(int argc, char **argv)
uloop_init();
ubus_add_uloop(ctx);
uloop_run();
+ uloop_done();
ubus_free(ctx);
return 0;