Hi...
In my linux daemon, with fpc 2.0.4 I was simply (in the main project)
looping while the program flag "quit" was false and, after that value
goes true, I was doing a :
shell('rm /var/run/myprogram.pid');
to remove the pid used into it's init.d script.
So the pid is deleted and the daemon have always disappeared from the
active processes list (effectively closing)
Now that I passed to 2.2.0, shell is deprecated, and I changed that
function into:
fpsystem('rm /var/run/myprogram.pid');
(fpsystem also works well to give other shell commands I use in the program)
But after that change in the program, and after some stop&start, I
spotted a lot of opened daemons with the state "R" (runnable) that was
using 100% of the cpu in the top list.
After some troubleshooting, I discovered that the command fpsystem('rm
/var/run/myprogram.pid') was sending the program into a instant crash,
without any notice.
I tryed to catch an exception with no success.
Now I have just removed the fpsystem row cause deleting the pid is not
essential for me cause I overwrite it (the value on the text file) at
the start of the program, but I'm writing that mail to ask if something
changed and if someone else have noticed this behaviour.
My guess, is that a program that received the "kill" signal can't call a
fpsystem command... can that be true?
If that helps, I'm using ubuntu with kernel 2.6.15-28-amd64-server
Thanks,
Bye
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives