The API of assuan_get_pid and its semantics are not good and resulted questionable use cases.
And it is non-portable, since the concept PID is different between POSIX and Windows.
We need better API here.
assuan_get_pid is used for two different purposes. Considering about Winodws:
(1) Getting some sort of ID for a process of client (used by server program).
(1-1) If the usage is showing it to a user for identifying process (in a dialog window), it would be better for Windows to use Process ID, instead of HANDLE
(2) Getting process HANDLE of server program to control the process (used by client program).
(2-1) It may be better offer a function for waitpid/WaitForSingleObject for assuan connection by libassuan, instead of exposing internal thing like PID (for POSIX) and allow direct access to the process with it.