Description
@mbinette91 commented on Thu Dec 01 2016
(as discussed in in PR #11998)
The documentation should be updated to reflect that EnableRaisingEvents=false offers no guarantee that Exited events will not be raised. [context: depends on the state of a private flag (_exited) and properties you query might still trigger events]
Some interesting passages to update:
Process.EnableRaisingEvents Property
Gets or sets whether the Exited event should be raised when the process terminates.
true if the Exited event should be raised when the associated process is terminated (through either an exit or a call to Kill); otherwise, false. The default is false.
The EnableRaisingEvents property indicates whether the component should be notified when the operating system has shut down a process.
When an associated process exits after being shut down by the operating system either through a normal or abnormal termination, the operating system notifies each process component to which the process was associated, as long as the component's EnableRaisingEvents value is true.
Setting EnableRaisingEvents to false saves system resources.
@mbinette91 commented on Thu Dec 01 2016
@Priya91 Sorry for the delay in creating the issue :)
@karelz commented on Thu Dec 01 2016
Can you please suggest the updated MSDN docs text? (Ideally before and after)
cc: @mairaw
@mbinette91 commented on Thu Dec 01 2016
Suggested modifications in bold/striked.
true if the Exited event should be raised when the associated process is terminated (through either an exit or a call to Kill); otherwise, false. The default is false. Note that the Exited event might still be raised even if this value is false.
The EnableRaisingEvents property suggests whether the component should be notified when the operating system has shut down a process.
When an associated process exits after being shut down by the operating system either through a normal or abnormal termination, the operating system notifies each process component to which the process was associated
as long asif the component's EnableRaisingEvents value is true (and possibly also when it's false).
[I give up on the one above, no matter how I try to word it, it sounds bad]
Setting EnableRaisingEvents to false can save
ssystem resources.
@Priya91 commented on Mon Dec 05 2016
Thanks @mbinette91