[Development] Qt Playground - Updating Daemon/Service Support

Sascha Cunz sascha-ml at babbelbox.org
Tue Nov 27 03:54:55 CET 2012


> All services/daemons must be able to interface with other processes:
Here, I almost agree :-)

>   (a)- a "client-process" can "request-a-client-operation" to occur on that
> service/daemon

But this is totally orthogonal to the application being a daemon/service. To 
some daemons your application "talks" HTTP, SMTP, mysql-protocol or whatever 
others...
Why would someone writing a cron-alike daemon want to listen on some 
QLocalSocket?

>   (b)- a process can "query" or "control" the service/daemon (such as to
> "pause" it, or "stop" it, etc.)

That is the task of:
- launchctl on Mac
- Service-Manager / "net start" / ServiceControlManager-API on Windows
- Init-Scripts (or interfaces to them) on Linux
  [This describtion meats OpenRC, Upstart, systemd and even SysVInit, right?]

Without using those, you blindly bypass any security mechanisms that the OS 
itself provides for services/daemons.
I really wouldn't like anybody on my system capable of creating a QLocalSocket 
to also be able to stop a service.

> Thus, some inter-process communication is always required.
IPC can also be shared-memory or files on disk. This has nothing to do with a 
QLocalSocket.

Sascha





More information about the Development mailing list