lxc_monitord: make lxc-monitord async signal safe
lxc_monitord: make lxc-monitord async signal safe

Before lxc_monitord called lxc_monitord_cleanup() from a signal handler.  This
function calls a bunch of async signal unsafe functions and basically begs for
deadlocks. This commit switches lxc-monitord to using sigsetjmp() and
siglongjmp() in the signal handler to jump to a cleanup label that call
lxc_monitord_cleanup(). In this way, we avoid using async signal unsafe
functions.

Signed-off-by: Christian Brauner <48455ab3070520a2d174545c7239d6d0fabd9a83@ubuntu.com>

cjwatson/lxc,terceiro/lxc,hallyn/lxc,hfuCN/lxc,cjwatson/lxc,aeris/lxc,federicobriata/lxc,thmo/lxc,hallyn/lxc,ss1h2a3tw/lxc,ss1h2a3tw/lxc,aeris/lxc,LynxChaus/lxc,terceiro/lxc,LynxChaus/lxc,hallyn/lxc,thmo/lxc,terceiro/lxc,hfuCN/lxc,federicobriata/lxc,caglar10ur/lxc,GreatFruitOmsk/lxc,thmo/lxc,ysbnim/lxc,ysbnim/lxc,GreatFruitOmsk/lxc,ysbnim/lxc,hfuCN/lxc,LynxChaus/lxc,caglar10ur/lxc,caglar10ur/lxc,aeris/lxc,GreatFruitOmsk/lxc,cjwatson/lxc,federicobriata/lxc,ss1h2a3tw/lxc