luci-app-nlbw: fix sporadic premature EOF when rendering JSON data
authorJo-Philipp Wich <jo@mein.io>
Wed, 17 Jan 2018 20:15:47 +0000 (21:15 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 17 Jan 2018 20:15:47 +0000 (21:15 +0100)
commit08916f4335e96e4a3c9dcf77262fa151348ed93c
treea310d1b0b43f6d60ce39e7697a8a0127d35c0956
parenta441721d32d06d18368bf236ad127ffccad0bef8
luci-app-nlbw: fix sporadic premature EOF when rendering JSON data

Specific timing patterns sometimes caused the LuCI controller to prematurely
stop reading data, resulting in truncated JSON output.

Turn the nonblocking waitpid() call into a blocking call after the IO read
loop to avoid this issue.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua