On 2013-10-22 10:24 AM, Kristian Evensen wrote:
> From: Kristian Evensen <[email protected]>
> 
> 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 <[email protected]>
Cleaned it up and simplified it a bit, then pushed my updated version:
http://nbd.name/gitweb.cgi?p=luci2/libubox.git;a=commitdiff;h=13a9b7c709ed78ec10a3fec2b631c2c3cfa2792f

Thanks,

- Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to