IProcessObserver Interface Reference


Description

IProcessObserver is the observer interface used to monitor the life cycle of processes created by the Process Service. This interface is registered with the Process Service as part of the process creation procedure initiated by a IProcessService::CreateProcess() call. For each call to IProcessService::CreateProcess() the client is guaranteed to receive exactly one call to OnProcessExit().

See also:
IProcessService

import "IProcessObserver.idl";

List of all members.

Public Member Functions

oneway void OnProcessExit (in long pid, in long exitStatus)

Member Function Documentation

oneway void IProcessObserver::OnProcessExit ( in long  pid,
in long  exitStatus 
)

This method is called when a process created by the Process Service has died. The method is called exactly once for each successful call to IProcessService::CreateProcess(), regardless of if the process was killed because of a call to IProcessService::ExitProcess() or if the process has exit for any reason on its own.

At the time of the call, any child process it had have been killed. Files left behind by these processes are still present. The callee must respond to this call by eventually calling IProcessService::DestroyProcess().

Parameters:
pid The process identifier of the process that has exit.
exitStatus The termination status of the process. This is the staus integer returned by the operating system on the wait family of system calls. Use WIFEXITED and similar facilities to investigate the details about how the process exited.