Hi, I had already given up this problem, but recently I've got a similar problem and so I returned to think about it. I got some advances although I am far from really solving all my doubts in this issue. It follows below some considerations.
The main method to be studied is
that we may see details here
When this method is called without arguments it calls the method
char* env = getenv("QTSERVICE_RUN")
returns a null pointer then the method
is called which create a new process and the first one is killed. On the other hand if
does not return a null pointer then the method
int QtServiceBasePrivate::run(bool asService, const QStringList &argList)
is called and the service realy starts.
If someone could explains a bit better how the QtService class works or point some link I would thanks.
Nowadays I am using a Debian distribution.