What method do I use to manage an app-specific background process?
- by Simon Dubois
I am developing an application with different behavior depending on the arguments :
"-config" starts a Gtk window to change options, start and close the daemon.
"-daemon" starts a background process that does something every X minutes.
I already know how to use fork/system/exec etc...
But I would like to know the main logic of such application to :
restart or refresh the daemon when configuration change.
keep only one instance of the daemon.
I have read that killing the daemon to restart it is not a clean way to do.
How other applications do ? (ubuntuone, weather forecast, rss feed working with notification area)
Thanks for your help.
PS : I don't want to create a system-wide daemon, just a user application with a background process.