Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evensen <kristian.evensen@gmail.com>2013-10-22 12:24:15 +0400
committerFelix Fietkau <nbd@openwrt.org>2013-10-22 19:26:05 +0400
commit13a9b7c709ed78ec10a3fec2b631c2c3cfa2792f (patch)
tree8dd99821dfc60c9fd2a15a5941128b6330c9dbf7 /utils.h
parent914ef8f6b002c8c57c54b8c8376facac25e1c551 (diff)
Restore signal handler after uloop_run()
uloop_run calls uloop_setup_signals() to set up signal handling before the while loop, but does not remove the signal handling after the loop has ended. This can cause problems for for example applications using the ubus file descriptor in their own event loops, and perhaps with their own signal handling. This patch stores the signal handle that was in place when the initial uloop_run() call was made, and restores the handle when this call returns. For recursive calls, the signal handler is not updated. One use-case I experienced was an application that subscribed to several ubus objects and used the ubus file descriptor in its own event loop. Even though ubus_register_subscriber() (which calls uloop_run()) had returned, the signal handler was not removed. This caused SIGINT not to be caught by the application. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'utils.h')
0 files changed, 0 insertions, 0 deletions