Hi there!
I have a little problem with a program. Hope somebody can help me (I'm not a pro.. not yet..)
I want to program a little taskplaner for a java app to launch up that app (azureus) at a certain time and to close it later automatically.
It works quite well. However, after closing ps -xa shows a zombie process.
At first, here is what I do..
Startup:
AProcess := TProcess.Create(nil);
AProcess.CommandLine:='java -Xms16m -Xmx128m -cp /home/wb/Desktop/bla/Azureus2.jar:/home/wb/Desktop/bla/swt.jar -Djava.library.path=/home/wb/Desktop/bla -Dazureus.install.path=/home/wb/Desktop/bla org.gudy.azureus2.ui.swt.Main';
AProcess.Execute; Killing:
if AProcess.Terminate(-1) then begin
AProcess.Free;
//AProcess.Destroy; Just tried this, gives an error but zombie goes away
end;After killing, azureus closes, but java remains as a zombie process until my Lazarus app is being closed. Maybe my app is waiting for the child.. no idea..
I want to clean up that stuff so there's no zombie after shutting down azureus.
Here my ps -xa |grep java:
Warning: bad ps syntax, perhaps a bogus '-'? See
http://procps.sf.net/faq.html 5115 pts/0 Z+ 0:03 [java] <defunct>
Thanks for reading!