Persistence Client Library Help

Vy Duong vduong at ics.com
Mon Apr 3 11:49:54 EDT 2017


It does get saved if I stop the application from Qt Creator.

-Vy

On Mon, Apr 3, 2017 at 11:47 AM, Justin Noel <justin at ics.com> wrote:

> 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
> "handleable".
>
> 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.
>
> --Justin
>
> On Mon, Apr 3, 2017 at 10:16 AM, Vy Duong <vduong at ics.com> 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:
> > https://lists.linuxfoundation.org/pipermail/genivi-
> persistence/2016-April/000256.html
> >
> > 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
> > http://ics.com/services/
> >
> > _______________________________________________
> > genivi-projects mailing list
> > genivi-projects at lists.genivi.org
> > http://lists.genivi.org/cgi-bin/mailman/listinfo/genivi-projects
> >
>



-- 
Vy Duong, Software Engineer, Integrated Computer Solutions.
ICS - Delivering World-Class Applications for Embedded & Mobile Devices
http://ics.com/services/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genivi.org/pipermail/genivi-projects_lists.genivi.org/attachments/20170403/bbf54588/attachment.html>


More information about the genivi-projects mailing list