Currently, `__assuan_spawn` in libassuan/src/system-w32.c, handles are inherited to child process.
With newer version of Windows (> Windows XP), `CreateProcessW` can use `EXTENDED_STARTUPINFO_PRESENT` flag to specify explicit handle-list of PROC_THREAD_ATTRIBUTE_HANDLE_LIST in lpAttributeList member of STARTUPINFOEXA structure. With `EXTENDED_STARTUPINFO_PRESENT` flag, handles inherited can be exactly controlled.
Besides, when we can assume newer versions of Windows (>= Windows 7 SP1, Windows Server 2008 R2 SP1), we can use `WSA_FLAG_NO_HANDLE_INHERIT` flag when we allocate socket by `WSASocketW`.
This will be good for GnuPG, because scdaemon and pinentry no longer have handles of gpg-agent sockets, etc.