Re: C atexit(), g_atexit -- how to cleanup when a gtk application crashes?
- From: Stefan Salewski <mail ssalewski de>
- To: gtk-list gnome org
- Subject: Re: C atexit(), g_atexit -- how to cleanup when a gtk application crashes?
- Date: Wed, 30 Nov 2016 12:58:04 +0100
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]