« Previous | Next » 

Revision 3674838c

ID3674838cd05268954bb6473239cd7f700a79bf0f

Added by Luiz Capitulino almost 12 years ago

qemu-ga: guest-shutdown: use only async-signal-safe functions

POSIX mandates1 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 <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences