search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

1 answers
Q&A C# Process start如何判断进程启动成功呢?waitForExit()是阻塞的

0

2049026637-57d520908e6b3_articlex.png

Your Answer
submit

1 answers
0

Process.Start(info) 返回的是一个 Process 对象,相关文档在这里。

Process 有几个事件,Exited 事件在进程结束后触发。ErrorDataReceived 在有错误输出时触发,OutputDataRecevied在有正常输出时触发。

还有几个属性,HasExited 检查是否已经结束,ExitCode 获取结束代码,ExitTime 获取结束时间。不过使用后两个属性之前都需要先判断 HasExited,因为如果进程还没结束,获取结束代码和时间都会引发异常。


2016-11-12 13:40:14

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use