fix SIGINT handling
This commit is contained in:
parent
4534209ea8
commit
2e83a5fab2
2 changed files with 3 additions and 0 deletions
|
@ -124,6 +124,8 @@ static bool recv_retry(int fd, struct iovec *iov, bool wait)
|
||||||
bytes = read(fd, iov->iov_base, iov->iov_len);
|
bytes = read(fd, iov->iov_base, iov->iov_len);
|
||||||
if (bytes < 0) {
|
if (bytes < 0) {
|
||||||
bytes = 0;
|
bytes = 0;
|
||||||
|
if (uloop_cancelled)
|
||||||
|
return false;
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ int main(int argc, char **argv)
|
||||||
uloop_init();
|
uloop_init();
|
||||||
ubus_add_uloop(ctx);
|
ubus_add_uloop(ctx);
|
||||||
uloop_run();
|
uloop_run();
|
||||||
|
uloop_done();
|
||||||
|
|
||||||
ubus_free(ctx);
|
ubus_free(ctx);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue