进程上的函数是否关闭?
假设我使用 Process.Start(); 创建了一个进程。
在不冻结应用程序的情况下,我如何判断它是否已关闭/终止?
Say I have created a process using Process.Start();.
How would I tell if it had been closed/terminated, without freezing the application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试下面的
代码 不过,这段代码有一个问题。
Process
可能会在附加事件处理程序之前退出。因此,对于快速退出的Process
,您可能不会收到此事件。Try the following
There is one catch to this code though. It's possible for the
Process
to exit before the event handler is attached. So you may not receive this event for aProcess
which exits quickly.