C utility functions for OpenWRT libraries
Find a file
Michal Sojka 7a1057604e uloop: Fix race condition in SIGCHLD handling
When uloop_process_add() is called outside of uloop_run(), i.e. not
from a callback (which is the case of at least utrace and ujail),
child events can be missed. The reason is that when SIGCHILD handler
is installed in uloop_run(), after the uloop_process_add() is called,
then an initial signal could be missed.

Commit 4e3a47a ("uloop: use a waker for notifying sigchld and loop
cancel events", 2016-06-09) solved a similar problem and introduced
uloop_init() but forgot to move a call to uloop_setup_signals() there.
This is what this commit does.

Now, uloop_process_add() can be called any time after uloop_init()
without missing any event.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-09-15 15:39:42 +08:00
examples blobmsg: add support for double 2017-01-04 21:36:31 +01:00
lua libubox: allow reading out the pid of uloop process in lua 2016-12-13 17:13:20 +01:00
sh Revert "jshn: only keep UP_* variables around while they are needed" 2014-11-23 23:53:44 +01:00
.gitignore examples: add shunit2 tests for json_script 2016-02-20 13:36:08 +01:00
avl-cmp.c avl: add blob comparator function 2016-07-29 10:58:55 +02:00
avl-cmp.h avl: add blob comparator function 2016-07-29 10:58:55 +02:00
avl.c list_compat.h: remove 2014-03-20 23:06:42 +01:00
avl.h avl: add AVL_TREE macro to define an initialized struct avl_tree 2014-03-27 17:39:53 +01:00
base64.c b64_encode(): fixed input[] not initialized warn under gcc 4.4.5 2015-09-09 11:03:07 +02:00
blob.c blobmsg: add support for double 2017-01-04 21:36:31 +01:00
blob.h blobmsg: add support for double 2017-01-04 21:36:31 +01:00
blobmsg.c blobmsg: add support for double 2017-01-04 21:36:31 +01:00
blobmsg.h blobmsg: add support for double 2017-01-04 21:36:31 +01:00
blobmsg_json.c blobmsg: add support for double 2017-01-04 21:36:31 +01:00
blobmsg_json.h blobmsg_json: add new functions blobmsg_format_json_value* 2016-07-02 10:10:08 +02:00
CMakeLists.txt Build static version of libblobmsg_json 2015-09-09 11:02:49 +02:00
jshn.c Fix various memory management issues 2016-06-26 12:53:51 +02:00
json_script.c json_script: enable custom expr handler callback 2017-06-01 11:23:16 +02:00
json_script.h json_script: add support for aborting script processing 2015-11-06 22:58:15 +01:00
kvlist.c Fix various memory management issues 2016-06-26 12:53:51 +02:00
kvlist.h kvlist: add static initializer macros 2016-10-24 12:34:09 +02:00
list.h list.h: implement type safety for container_of() 2013-03-18 05:55:00 +01:00
md5.c md5: add "const" qualifier to the "file" argument 2017-03-20 12:44:46 +01:00
md5.h md5: add "const" qualifier to the "file" argument 2017-03-20 12:44:46 +01:00
runqueue.c runqueue: fix use-after-free bug 2017-06-14 12:08:53 +02:00
runqueue.h libubox: add static initializer macro for runqueues 2016-07-29 12:01:37 +02:00
safe_list.c runqueue: add a function that allows adding jobs to the front of the runqueue 2013-11-18 12:25:21 +01:00
safe_list.h runqueue: add a function that allows adding jobs to the front of the runqueue 2013-11-18 12:25:21 +01:00
ulog.c libubox: replace strtok with _r version. 2016-12-24 11:03:29 +01:00
ulog.h ulog: introduce new simple logging api 2015-02-26 10:43:56 +01:00
uloop-epoll.c uloop: remove useless epoll data assignment 2016-12-12 12:24:14 +01:00
uloop-kqueue.c uloop: use a waker for notifying sigchld and loop cancel events 2016-06-15 11:54:37 +02:00
uloop.c uloop: Fix race condition in SIGCHLD handling 2017-09-15 15:39:42 +08:00
uloop.h uloop: allow specifying a timeout for uloop_run() 2017-06-01 11:24:44 +02:00
usock.c usock: implement usock_inet_timeout() with RFC6555 support 2016-01-28 12:07:25 +01:00
usock.h usock: implement usock_inet_timeout() with RFC6555 support 2016-01-28 12:07:25 +01:00
ustream-fd.c ustream-fd: handle ENOTCONN for read/write on not-yet-connected sockets 2016-01-15 21:35:48 +01:00
ustream.c Fix various memory management issues 2016-06-26 12:53:51 +02:00
ustream.h ustream: add function ustream_read(). 2015-01-21 20:00:39 +01:00
utils.c libubox: Change calloc_a() to return size_t aligned pointers 2017-02-24 15:00:15 -05:00
utils.h utils: fix build on Mac OS X 10.12 2017-01-20 11:29:53 +01:00
vlist.c vlist: constify key argument to vlist_add 2013-10-05 21:40:04 +02:00
vlist.h vlist: add static initializer macros 2014-06-05 15:28:45 +02:00