Persistence Client Library Help

Justin Noel justin at
Mon Apr 3 11:47:44 EDT 2017

I think I can shed some light on the above.

1) The HMI (launcher) exiting will not close any applications. It will
happily restart and reclaim the surfaces of the already running
applications and continue normally.

2) There UnixSignalHandler class from the HMI is a way to gracefully
shut down on SIGTERM and SIGINT signals sent to the process. For
example CTRL-C on a termanial would produce SIGINT. Qt Creator sends
SIGTERM followed by SIGKILL. Systemd should also send TERM followed by
KILL if the process refused to politely shutdown. KILL is not

3) From the description above it sounds like you can save persisted
data to disk when your application "cleanly shuts down", but not if
it's forced to shut down. Does the persisted data get saved when
stopping the application from Qt Creator? That should trigger a
SIGTERM via the UnixSignalHandler.


On Mon, Apr 3, 2017 at 10:16 AM, Vy Duong <vduong at> wrote:
> Hi,
> I am writing an application that makes use of the PCL. In order for
> information to be retained across boots, my application needs to do some
> "cleaning up" in terms of de-initializing the library and having NSM do the
> actual writing of the data to the device or set the life cycle.
> This email thread has the summary of how the library works:
> Initially, I had relied on the NSM to do the final writing, but this didn't
> work since the NSM doesn't get kill before the application does and there is
> no real "quitting" of either applications. So, I had gone to the latter
> option, write back controlled by application.
> I had noticed that the HMI code has a "UnixSignalHandler" class that handles
> when the application closes based on the interrupt or termination of the
> application. I copied those files into my application folder and was able to
> do connect the quit of the application to the clean up code.
> A follow up problem I am experiencing right now is that the HMI may quit or
> terminate without notifying the underlying applications that it has exited.
> Can you please provide some advice on whether including the
> UnixSignalHandler was the way to go or if there is an alternative option?
> And thoughts on how to handle when the HMI quits, but the application does
> not recognize that it has exited?
> Thank you very much in advance!
> Best,
> Vy
> --
> Vy Duong, Software Engineer, Integrated Computer Solutions.
> ICS - Delivering World-Class Applications for Embedded & Mobile Devices
> _______________________________________________
> genivi-projects mailing list
> genivi-projects at

More information about the genivi-projects mailing list