cli: add timeout support for listen command
authorZhao, Gang <gang.zhao.42@gmail.com>
Fri, 26 Feb 2016 09:18:39 +0000 (17:18 +0800)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 29 Feb 2016 20:06:42 +0000 (21:06 +0100)
commitb958a9aa60a683a4e4cc1882cb13fd00c8622be6
tree3ec5af7cfba82df3349ab383a1b1723b3372c199
parent6cd8912f102e721ea10ac13a1885fb9127cb4951
cli: add timeout support for listen command

Currently 'ubus listen' command does not respect the timeout parameter,
i.e., whether timeout parameter is provided, 'ubus listen' will always
run infinitely. This patch let 'ubus listen' command support the timeout
parameter. For example, 'ubus listen -t 60' will cause the command to
exit after 60 seconds.

Signed-off-by: Zhao, Gang <gang.zhao.42@gmail.com>
cli.c