xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
Process.xcs
浏览该文件的文档.
1
5@Declare
6class Process{
7 public static const int Default = 0,
8 Visible = 1,
9 StdOut = 2,
10 StdIn = 4,
11 StdErr = 8,
12 RedirectStdErr = 0x10,
13 NewConsole = 0x20;
18 public Process(String command);
19
25 public Process(String command, String [] args);
26
32
42 public bool create(int flags);
43
50 public bool waitFor(int millis);
51
52
60 public int read(byte [] buffer, int pos, int length);
61
69 public int write(byte [] buffer, int pos, int length);
70
75 public int getExitCode();
76
81 public bool exit(int exitCode);
82
83
88 public long id();
89
90
95 public static long getId();
96
97
102 public void raise(int sig);
103
111 public int readError(byte [] buffer, int pos, int length);
112};
113
进程类
setWorkDirectory(String dir)
设置进程工作目录
static const int RedirectStdErr
bool waitFor(int millis)
等待进程退出
Process(String command, String [] args)
构造
static const int Visible
static const int StdErr
static const int Default
int getExitCode()
获取退出代码
int write(byte [] buffer, int pos, int length)
写入标准输入数据
static const int StdIn
long id()
获取ID
bool create(int flags)
创建进程
bool exit(int exitCode)
退出 (SIGKILL)
static const int NewConsole
static const int StdOut
Process(String command)
构造
int read(byte [] buffer, int pos, int length)
读取标准输出数据
static long getId()
获取当前进程ID
int readError(byte [] buffer, int pos, int length)
读取错误输出数据
字符串类