The ExecutionManager component provides a C++ interface for creating, starting and stopping processes in solutions that are based on KasperskyOS.
The interface of the ExecutionManager component is not suitable for use in code that is written in C. To manage processes in the C language, use the task.h interface of the libkos library.
The ExecutionManager component API is an add-on over IPC that helps simplify the program development process. ExecutionManager is a separate system program that is accessed through IPC. However, developers are provided with a client library that eliminates the necessity of directly using IPC calls.
The programming interface of the ExecutionManager component is described in the article titled "ExecutionManager component".
ExecutionManager component usage scenario
Hereinafter "the client" refers to the application that uses the ExecutionManager component API to manage other applications.
The typical usage scenario for the ExecutionManager component includes the following steps:
find_package (execution_manager REQUIRED)
include_directories (${execution_manager_INCLUDE})
add_subdirectory (execution_manager)
The BlobContainer
program is required for the ExecutionManager program to work properly. This program is automatically added to a solution when adding ExecutionManager.
create_execution_manager_entity()
from the CMake library execution_manager
.To build the ExecutionManager program, create a directory named execution_manager
in the root directory of the project. In the new directory, create a CMakeLists.txt
file containing the create_execution_manager_entity()
command.
The CMake command create_execution_manager_entity()
takes the following parameters:
Mandatory ENTITY
parameter that specifies the name of the executable file for the ExecutionManager program.
Optional parameters:
DEPENDS
– additional dependencies for building the ExecutionManager program.MAIN_CONN_NAME
– name of the IPC channel for connecting to the ExecutionManager process. It must match the value of the mainConnection
variable when calling the ExecutionManager API in the client code.ROOT_PATH
– path to the root directory for service files of the ExecutionManager program. The default root path is "/ROOT"
.VFS_CLIENT_LIB
– name of the client transport library used to connect the ExecutionManager program to the VFS
program.include (execution_manager/create_execution_manager_entity)
create_execution_manager_entity(
ENTITY ExecMgrEntity
MAIN_CONN_NAME ${ENTITY_NAME}
ROOT_PATH "/root"
VFS_CLIENT_LIB ${vfs_CLIENT_LIB})
BlobContainer
programCMakeLists.txt
file for building the client:target_link_libraries (<name of the CMake target for building the client> ${execution_manager_EXECMGR_PROXY})
execution_manager.ExecMgrEntity
process class:execute
type for all classes of processes that will be run.VFS
program.BlobContainer
program.Sync
, Task
, VMM
, Thread
, HAL
, Handle
, FS
, Notice
, CM
and Profiler
(their descriptions are located in the directory sysroot-*-kos/include/kl/core
from the SDK).sysroot-*-kos/include/kl/execution_manager
from the SDK).Use the header file component/package_manager/kos_ipc/package_manager_proxy.h
for this. For more details, refer to "ExecutionManager component".