[Lazarus] Linux service

Antonio Fortuny a.fortuny at sitasoftware.lu
Fri Mar 15 10:34:36 CET 2013


Hi Folks.

I've a problem when launching a service in a Linuxbox (OpenSuse 12.1, VM 
under esxi).
The service program has been first developped in Win32. It is installed 
without problem, then ran and stopped and finally uninstalled. All 
functions run well as I get the events into the log file
Then port on Linux, compile OK. Just adapt the log file name
I've made a script based on the smb one. The service is called 
ipserviced the program itself /usr/local/bin/ipservice
chkconfig'ed --add, --list, --level all run well. S01Servicename and 
corresponding K01... have been created into corresponding  rc?.d folders
So far, so good. But wen launching:
# service ipserviced start
Starting IpService daemon (is displayed by service launcher)
shell is hung, some process is lanched, see:
root      2420 12428  0 10:10 pts/3    00:00:00 /bin/sh /sbin/service 
ipserviced start
root      2422  2420  0 10:10 pts/3    00:00:00 /bin/sh 
/etc/init.d/ipserviced start
root      2430  2422  0 10:10 pts/3    00:00:01 startproc -p 
/var/run/ipservice/ipservice.pid -W /var/run/ipservice/ipservice.pid 
/usr/local/bin/ipservice -r -D -s /usr/local/bin/ipservice.conf
root      2431  2430  0 10:10 pts/3    00:00:00 /usr/local/bin/ipservice 
-r -D -s /usr/local/bin/ipservice.conf
but nothing happens: no pid id in /var/run/ipservice.ipservice.pid
no file created in
'/tmp/' + ExtractFileNameWithoutExt(ParamStr(0)) + '.log';
It looks like if no code has been called.
When I kill the command line (Ctrl-C), boum:
Exception at 0000000000000000
Access violation.
but all processes listed above are killed

Any suggestion apprediated.

Antonio.






More information about the Lazarus mailing list