[SailfishDevel] Creating daemons

Jarko Vihriala jarko.vihriala at jollamobile.com
Wed May 8 04:54:17 UTC 2013


I don't know if this is the best way but I've done it so:

1. "Daemon" is basically a QCoreApplication which has dbus-interface
2. It's invoked by sending first dbus message to it (I use session for this)
3. It does not have systemd dependecy so it needs to take care of it's 
own living. I use a ShMem block so I need to make sure that block is 
available when this daemon wakes up
4. UI application is just a QML/C++ app that has interface to dbus

In a nutshell you need
1. app based on QCoreApplication
2. dbus service and interface definition
3. take care of the "daemon's" lifecycle

thanks, Jarko

On 05/07/2013 10:56 PM, David Greaves wrote:
> On 07/05/13 19:37, Shantanu Tushar Jha wrote:
>> Hi,
>>
>> I'm trying to run one of my harmattan apps using Sailfish SDK. My app consists
>> of a daemon and a UI app which communicate with each other. I couldn't find any
>> info on how to create daemons on Sailfish/nemo. Any pointers?
> In general daemons are run using systemd. We use systemd user sessions.
>
> This typically makes writing a daemon easier as it does not need to worry about
> forking or respawning.
>
> Lots of detail here:
>    http://www.freedesktop.org/software/systemd/man/daemon.html
>
> David
>
> _______________________________________________
> SailfishOS.org Devel mailing list


-- 
We are #unlike.
Jolla Oy, http://www.jolla.com



More information about the Devel mailing list