Using Win32 I can create kernel objects which have their handles inherited to child processes (e.g. CreateEvent
with SECURITY_ATTRIBUTES.bInheritHandle = true
). Although I can get the same result by using P/Invoke I'm wondering why this functionality has not been made available by the framework class library even though System.Diagnostics.Process.Start()
calls Win32's CreateProcess
with bInheritHandles = true
.
Is this technique outdated, not safe or just not very well known?