.net - C# wait for external PID to exit -
this question has answer here:
how wait until pid (not started program itself) doesn't exist longer? want program pid external program via commandline parameter , wait exit , something.
i searched it, find examples process has been startet c# program itself. that's easy manage ..
i going this, doesn't work ..
process[] pname = process.getprocessbyid(7860); if (pname.length == 0) console.writeline("nothing"); else console.writeline("run");
how can accomplished?
you can writing:
var p = process.getprocessbyid(7860); p.waitforexit();
Comments
Post a Comment