[maemo-developers] Check if application is run

From: Michael Stepanov michael at stepanoff.org
Date: Fri Nov 9 09:31:12 EET 2007
Well if I understand clearly I have to define dbus services for SDL
application and for its maemo wrapper (it's already done for the wrapper).
And then listen in the wrapper events sent from the SDL application. Catch
'crash' event or similar and run it again. Right?

On 11/8/07, Mika Yrjölä <exploderi at gmail.com> wrote:
>
> On 11/7/07, Michael Stepanov <michael at stepanoff.org> wrote:
> >
> >
> > On 11/7/07, Mika Yrjölä <exploderi at gmail.com> wrote:
> > > On 11/7/07, Michael Stepanov <michael at stepanoff.org> wrote:
> > > > Hi,
> > > >
> > > > I developed a simple Maemo application using its SDK which just run
> > another
> > > > SDL-based program with specified parameters. So, I'd like to catch
> the
> > case
> > > > when the SDL program crashed by some reason to run it again. What is
> the
> > > > most efficient way to periodically check something in the Maemo SDK?
> > >
> > > If the launched program registers itself as a D-BUS service, other
> > > applications can then monitor the service for events such as its
> > > disappearance (also avoiding the need to check the status of the
> > > application periodically).
> >
> > Sounds very attractive! But in what place I should call that check in
> the
> > main program?
>
> It's possible to setup the monitoring before or after launching the
> other application. The following part of the D-BUS specification
> describes a couple of useful methods and signals on the message bus,
> which can be used for tracking the life of a service:
>
> http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-types
>
> The implementation details depend on whether you will use the
> low-level libdbus or some higher level bindings, though, so I realize
> this is still rather abstract description of how to do it :)
>



-- 
Cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20071109/d645f48e/attachment.htm 
More information about the maemo-developers mailing list