Re: C atexit(), g_atexit -- how to cleanup when a gtk application crashes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2016-11-30 at 12:05 +0100, Stefan Salewski wrote:
> Unfortunately so the cleanup proc is called already, while the main
> application is still running.

I may have an idea:

Call inside the cleanup proc

https://developer.gnome.org/gio/stable/GApplication.html#g-application-get-default

and

https://developer.gnome.org/gio/stable/GApplication.html#g-application-get-is-remote

And do the cleanup only when not is remote.

I think I will test that tonight.

I still wonder how such a cleanup on crash is handled by a plain C
application. Seems that C lib atexit() is not really called at abnormal
program termination. For Nim it seems that cleanup proc is called
always, because exceptions are caught. 
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux