Does anyone know how to kill a cache process ? I have tried $zutil
(4,pid) but it does not kill cache process but terminal and others
systems process.
My intention is to kill a process when the routine stops working due
to an external routine. Since I can collect a PID num on the start up,
it would be easy to kill it after find out when the systems freezes up
for a particular reason.
thank you all
mig
Sent from my iPhone
set OK = 0
zn "%SYS"
set Job=##CLASS(SYS.Process).%OpenId(PID)
if (Job '= "")
{
set canBeKilled = Job.CanBeTerminated
if (canBeKilled)
{
set cpt = 0
while ((OK = 0) && (cpt <100)) //100 or 10, must try
{
set st = Job.ReleaseAllLocks()
set status = Job.Terminate()
if (status = 1) //if ($$$ISOK(status))
{set OK = 1}
else
{
HANG 1
set cpt = cpt + 1
}
}
}
}
k Job
--Huong
On 2010-06-27 00:55, desenv wrote:
> Hi
>
> Does anyone know how to kill a cache process ? I have tried
> $zutil(4,pid) but it does not kill cache process but terminal and