[Lazarus] Linux service
a.fortuny at sitasoftware.lu
Wed Nov 27 09:27:49 CET 2013
I have created a service which has to run into Windows and Linux
servers. The program runs OK on both OS and the service runs nicely in
Windows (32 and 64). I'm only a little bit stuck onto an UBUNTU
platform. I've managed to launch and stop the service on an OpenSuse
platform (thanks to Michael) using the standard tools startproc and
killproc which do correctly teir job inside the service script when
using the correct parameters. I'm trying to do the same in an UBUNTU
script using this time start-stop-daemon. No problem to start the
service but when stopping I still see the program running (simple ps
-ef). Besides this, into the log produced by the service I read that the
stop command has been caught and the program definitely reached the last
line of the code. Buth the program still hangs somewhere as if the
"unload" action didn't wok.
The run parameter "-r" has been given in the command which launches the
program inside the script. Finally I need a kill -9 to get the program out.
Maybe is this a normal behaviour but I guess not.
Another question: should I do something else in the code to have the
service unloaded when stop is complete ?
More information about the Lazarus