Process.kill() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to Process Class Summary

Availability
Windows, Mac OSX, Linux

Usage
mdm.Process.kill():Boolean

Parameters
None

Returns
boolean

Description
Uses system features to try to close running process - boolean is returned to indicated if process was closed or not.

Notes
Calling this method could return false as for example for process that needs user action before it is closed (text editors are good sample of such processes)

Please note that if your instance of mdm.Process started other child process - or asked system launch services to launch other native application calling "kill" method on instance of mdm.Process could not result in terminating the other application. Technically that is not possible to kill such applications on some OS versions - for example on Mac OS X mdm.Process can be used to launch native applications like Safari.app via system launch services - but started Safari process is not maintained nor child process of mdm.Process.

Example Code
// was this process already created
if(process != null)
{
// is this process still running?
// if so kill it (forcefully close)
if(process.isOpen() == true)
{
var killed:Boolean = process.kill();
};
// release
process = null;
};

mdm.Process Class Example Downloads
Simple Process Example


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page