xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 静态包属性
Process类 参考

进程类 更多...

Public 成员函数

静态 Public 成员函数

静态包属性

详细描述

进程类

在文件 BuiltinObjects.x1048 行定义.

构造及析构函数说明

◆ Process() [1/4]

◆ Process() [2/4]

void Process ( String  ,
  String[] 
) throws IllegalArgumentException

◆ Process() [3/4]

Process ( String  command)

构造

参数
command进程命令

◆ Process() [4/4]

Process ( String  command,
String []  args 
)

构造

参数
command进程命令
args进程参数

成员函数说明

◆ create() [1/2]

bool create ( int  flags)

创建进程

参数
visible创建的进程是否可见
stdread是否接替标准输入
stdwrite是否接替标准输出
newConsole是否为控制台程序创建窗口
返回
成功或者失败 @Exception IllegalArgumentException 参数异常 详细信息见message

◆ create() [2/2]

bool create ( int  ) throws IllegalArgumentException

◆ CurrentProcessId()

static final long CurrentProcessId ( )
static

◆ exit() [1/2]

bool exit ( int  exitCode)

退出 (SIGKILL)

返回

◆ exit() [2/2]

bool exit ( int  )

◆ finalize()

void finalize ( )

◆ getExitCode() [1/2]

int getExitCode ( )

◆ getExitCode() [2/2]

int getExitCode ( )

获取退出代码

返回
代码

◆ getId()

static long getId ( )
static

获取当前进程ID

返回
id

◆ id() [1/2]

long id ( )

◆ id() [2/2]

long id ( )

获取ID

返回
id

◆ raise() [1/2]

void raise ( int  sig)

向进程发送信号

返回

◆ raise() [2/2]

void raise ( int  )

◆ read() [1/2]

int read ( byte []  buffer,
int  pos,
int  length 
)

读取标准输出数据

参数
buffer缓冲区
pos位置
length长度
返回
读取长度

◆ read() [2/2]

int read ( byte  [],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

◆ readError() [1/2]

int readError ( byte []  buffer,
int  pos,
int  length 
)

读取错误输出数据

参数
buffer缓冲区
pos位置
length长度
返回
读取长度

◆ readError() [2/2]

int readError ( byte  [],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

◆ setWorkDirectory() [1/2]

setWorkDirectory ( String  dir)

设置进程工作目录

参数
dir目录路径

◆ setWorkDirectory() [2/2]

bool setWorkDirectory ( String  ) throws IllegalArgumentException

◆ waitFor() [1/2]

bool waitFor ( int  millis)

等待进程退出

参数
mills等待超时
返回
超时返回false; 等待成功返回true @Exception IllegalArgumentException 参数异常 进程可能已退出

◆ waitFor() [2/2]

bool waitFor ( int  ) throws IllegalArgumentException

◆ write() [1/2]

int write ( byte []  buffer,
int  pos,
int  length 
)

写入标准输入数据

参数
buffer缓冲区
pos位置
length长度
返回
写入的长度

◆ write() [2/2]

int write ( byte  [],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

结构体成员变量说明

◆ Default

static const int Default = 0
staticpackage

在文件 BuiltinObjects.x1049 行定义.

◆ NewConsole

static const int NewConsole = 0x20
staticpackage

在文件 BuiltinObjects.x1055 行定义.

◆ RedirectStdErr

static const int RedirectStdErr = 0x10
staticpackage

在文件 BuiltinObjects.x1054 行定义.

◆ StdErr

static const int StdErr = 8
staticpackage

在文件 BuiltinObjects.x1053 行定义.

◆ StdIn

static const int StdIn = 4
staticpackage

在文件 BuiltinObjects.x1052 行定义.

◆ StdOut

static const int StdOut = 2
staticpackage

在文件 BuiltinObjects.x1051 行定义.

◆ Visible

static const int Visible = 1
staticpackage

在文件 BuiltinObjects.x1050 行定义.