From 3674838cd05268954bb6473239cd7f700a79bf0f Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Mon, 14 May 2012 15:25:20 -0300 Subject: qemu-ga: guest-shutdown: use only async-signal-safe functions POSIX mandates[1] that a child process of a multi-thread program uses only async-signal-safe functions before exec(). We consider qemu-ga to be multi-thread, because it uses glib. However, qmp_guest_shutdown() uses functions that are not async-signal-safe. Fix it the following way: - fclose() -> reopen_fd_to_null() - execl() -> execle() - exit() -> _exit() - drop slog() usage (which is not safe) [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html Signed-off-by: Luiz Capitulino Reviewed-by: Eric Blake Signed-off-by: Michael Roth --- qapi-schema-guest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qapi-schema-guest.json') diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json index 7c6cb21a79..d4055d262a 100644 --- a/qapi-schema-guest.json +++ b/qapi-schema-guest.json @@ -126,8 +126,7 @@ # @guest-shutdown: # # Initiate guest-activated shutdown. Note: this is an asynchronous -# shutdown request, with no guaruntee of successful shutdown. Errors -# will be logged to guest's syslog. +# shutdown request, with no guarantee of successful shutdown. # # @mode: #optional "halt", "powerdown" (default), or "reboot" # -- cgit v1.2.3