tpProcess类
Utils
2025-07-05
基础信息
头文件: | include <tpProcess.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 类型
enum ProcessState {
NotRunning, Starting, Running
}
Public 成员函数
tpProcess() | ||
---|---|---|
~tpProcess() | ||
start(const tpString &program, const tpVector< tpString > &arguments) | 启动一个进程 | |
start(const tpString &command) | 启动一个进程 | |
state() const | 获取启动进程当前状态 | |
waitForFinished(int msecs=30000) | ||
waitForStarted(int msecs=30000) | ||
launchProcessID() | 获取启动进程ID | |
lauanchProcessPID() | 获取启动进程PID | |
virtual tpString | launchProcessName() | 获取启动进程名称 |
成员枚举类型说明
enum tpProcess::ProcessState
名称 | 值 | 描述 |
---|---|---|
NotRunning | 0 | |
Starting | 1 | |
Running | 2 |
成员函数说明
tpProcess::tpProcess()
暂无注释...
tpProcess::~tpProcess()
暂无注释...
void tpProcess::start(const tpString &program, const tpVector< tpString > &arguments)
点击查看...
启动一个进程
void tpProcess::start(const tpString &command)
点击查看...
启动一个进程
ProcessState tpProcess::state() const
点击查看...
获取启动进程当前状态
返回值:
状态枚举
bool tpProcess::waitForFinished(int msecs=30000)
暂无注释...
bool tpProcess::waitForStarted(int msecs=30000)
暂无注释...
virtual
int32_t tpProcess::launchProcessID()
点击查看...
获取启动进程ID
返回值:
进程ID,如果进程为空返回-1
virtual
pid_t tpProcess::lauanchProcessPID()
点击查看...
获取启动进程PID
返回值:
进程PID,如果进程为空返回-1
virtual
tpString tpProcess::launchProcessName()
点击查看...
获取启动进程名称
返回值:
进程名称