We use our Java application under X that starts from
root@denis-laptop:~# uname -a Linux denis-laptop 2.6.32-36-generic #79-Ubuntu SMP Tue Nov 8 22:29:26 UTC 2011 i686 GNU/Linux
It starts as a full-screen replacement of GDM. When the system is powered down, it seems our app receives SIGKILL and not SIGTERM (this is the reason some resources are not stored to disk).
How could this happen?
I should also warn once again, that application starts exclusively fom,
/etc/X11/Xsessions.d/9999ngoma. Exclusively means that Gnome is loaded only after our application exits (I just don't know other way to run application exclusively under X).
Could it be that GDM receives SIGTERM and then SIGKILL child that didn't finish during GDM session initialization process (script at Xsession.d directory).