Home GnuPG

Reduce inherited handles for Windows child proc

Description

Reduce inherited handles for Windows child proc

When starting the WindowsProcessDevice we would inherit
all handles marked as inhertiable to the child process.
This somehow leads to a problem on Network drives where
an open File handle to \device\afd is inherited. This
open File handle appears to cause Windows to keep the
stdout Handle of the child process open as it does not
fully terminate the child. This then causes a hang
in the ReadFile call.

This way we only inherit the three handles we want to
inherit. Which is much cleaner as it filters out a lot
of other handles to threads etc. which we do not want
to inherit.