Qt Implementation of a Unix daemon. More...
#include <QxtDaemon>
Inherits QObject.
QxtDaemon will provide you with a standard UNIX daemon implementation.
after sucessful forking it will install a messageHandler which logs all qDebug/qWarning/etc... output to /var/log/mydaemon.log
example usage:
forks the current Process
you can specify weather it will write a pidfile to /var/run/mydaemon.pid or not
if you specify true (the default) QxtDaemon will also try to lock the pidfile. If it can't get a lock it will assume another daemon of the same name is already running and exit
be aware that after calling this function all file descriptors are invalid. QFile will not detect the change, you have to explicitly close all files before forking.
return true on success
changes the current user of this process.
do this after forking to drop root rights.
returns true on success
returns the current processId
| Copyright © 2007 Qxt Foundation | Trademarks | Qt Extension Library 0.5 |