Vmware-user's signal handler was destroying RPC channels when it
shouldn't have. Rather than having a few cases where we decide to
call VMwareUserCleanupRpc before exiting the main loop, this change
simply places a call to VMwareUserCleanupRpc /after/ the main loop
has exited. (The X I/O error handler is a special case, as apps
are -not- supposed to return from that handler.)
In the case of bug 542135, vmware-user received SIGUSR2 while still
initializing, destroying gRpcIn, before control was returned to the
initialization and eventmanager routines which expected gRpcIn to
still exist.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
gSigExit = TRUE;
}
- if (gSigExit) {
- VMwareUserCleanupRpc(FALSE);
- }
-
#if defined(HAVE_GTKMM)
Gtk::Main::quit();
#else
VMwareUser_OnDestroy(GtkWidget *widget, // IN: Unused
gpointer data) // IN: Unused
{
- VMwareUserCleanupRpc(FALSE);
#if defined(HAVE_GTKMM)
Gtk::Main::quit();
#else
}
#endif
+ /*
+ * Clean up everything attached to the backdoor before waving goodbye.
+ */
+ VMwareUserCleanupRpc(FALSE);
+
/*
* SIGUSR2 sets this to TRUE, indicating that we should relaunch ourselves.
* This is useful during a Tools upgrade where we'd like to automatically