[Lazarus] Linux service

Antonio Fortuny a.fortuny at sitasoftware.lu
Fri Mar 15 11:49:48 CET 2013


1. Change this to use strace:

startproc -p /var/run/ipservice/ipservice.pid -W 
/var/run/ipservice/ipservice.pid  strace -f -o /tmp/start.log 
/usr/local/bin/ipservice -r -D -s /usr/local/bin/ipservice.conf

Same behaviour, got a /tmp/start-man.log and start.log (very similar)
3983  execve("/usr/local/bin/ipservice", ["/usr/local/bin/ipservice", 
"-r", "-D", "-s", "/usr/local/bin/ipservice.conf"], [/* 56 vars */]) = 0
3983  brk(0)                            = 0x7bc000
3983  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x7f1a74c7d000
3

between them, nothing related to ipservice(d)

last lines:
3983  sendto(3, "<14>Mar 15 11:20:51 ipservice: ["..., 96, MSG_NOSIGNAL, 
NULL, 0) = 96
3983  sendto(3, "<14>Mar 15 11:20:51 ipservice: ["..., 141, 
MSG_NOSIGNAL, NULL, 0) = 141
3983  rt_sigprocmask(SIG_BLOCK, [], [], 8) = 0
3983  rt_sigsuspend([])                 = ? ERESTARTNOHAND (To be restarted)

<<< killed by me (Ctrl-C)
3983  --- SIGINT (Interrupt) @ 0 (0) ---
3983  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
3983  +++ killed by SIGSEGV +++
in /tmp/start.log you'll then see what the process is doing.

2. Try starting the process manually
strace -f -o /tmp/start-man.log /usr/local/bin/ipservice -r -D -s 
/usr/local/bin/ipservice.conf

and see if there is a difference.

no significative difference between them

Michael.





More information about the Lazarus mailing list