Re: [gtk-vnc-devel] possible cure for that crash....
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Rob Stoddard <rstoddard telanetix com>
- Cc: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] possible cure for that crash....
- Date: Sat, 3 May 2008 14:30:32 +0100
On Fri, May 02, 2008 at 02:45:20PM -0700, Rob Stoddard wrote:
> I changed gvnc_shutdown like so:
>
> void gvnc_shutdown(struct gvnc *gvnc)
> {
> gvnc->has_error = 1;
> GVNC_DEBUG("Waking up couroutine to shutdown gracefully\n");
> g_io_wakeup(&gvnc->wait);
> close(gvnc->fd);
> gvnc->fd = -1;
> }
>
>
> This allows the vnc coroutine to still be able to use the socket until
> it can get back to the top of the server_messages routine. I don't know
> much about coroutines, so I hope somebody out there can affirm that the
> coroutine will always reach the bottom of server_message so that it can
> kick out (because of the has_error variable being set) and gracefully
> shutdown the VNC widget. Perhaps it would be wise to let the coroutine
> close the socket and set the FD to -1, and then change gvnc_shutdown()
> to look more like this...
>
> void gvnc_shutdown(struct gvnc *gvnc)
> {
> gvnc->has_error = 1;
> GVNC_DEBUG("Waking up couroutine to shutdown gracefully\n");
> while(gvnc->fd != -1)
> g_io_wakeup(&gvnc->wait);
> }
>
>
> This allows the coroutine to reach a cleaned up state and close the
> resources it relies upon. Then the vncdisplay can do whatever cleaning
> up it needs to do.
Can you check the latest HG head code - as Jonh says, we believe we
already fixed this.
Dan.
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]