libxl: Do not call assert() in signal handlers
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 22 Oct 2015 15:39:12 +0000 (16:39 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 23 Oct 2015 13:32:45 +0000 (14:32 +0100)
commitcd84a2baadd4a5767d2568b1c01b055328cc84db
treea9eb31b4688f685ce0fa94c85cdaff176fad58e2
parent63ad168925a3f6190db393dc38835fedb1b791e3
libxl: Do not call assert() in signal handlers

assert is not async-signal-safe.

In practice the effect of calling assert there is that if the
assertion fails we might get a secondary crash, or other undesirable
behaviour from stdio (which is how assert usually reports failures).

Mention in a comment in libxl__self_pipe_wakeup that it has to be
async-signal-safe.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_event.c
tools/libxl/libxl_fork.c
tools/libxl/libxl_save_helper.c