Before factoring out to gpgrt, let me improve the API of gnupg_spawn_process function.
Description
Revisions and Commits
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | • gniibe | T6249 gpgrt: spawn functions | ||
Resolved | • gniibe | T6275 gnupg26: Improve gnupg_spawn_process function |
Event Timeline
On Windows, closing/inheriting handles is different to POSIX.
https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873
https://devblogs.microsoft.com/oldnewthing/20130426-00/?p=4543
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-startupinfoexw
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-initializeprocthreadattributelist
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-updateprocthreadattribute
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-deleteprocthreadattributelist
In Go, it seems that it is not solved yet: https://github.com/golang/go/issues/36550
In Python, it seems that it is supported: https://github.com/python/cpython/blob/main/Lib/subprocess.py
Pushed to GnuPG master. Let us test. For my machine of Debian GNU/Linux, Wine emulation (Windows 32-bit, Windows 64-bit), make check goes all well.
After confirming the implementation, I'd like to put it into gpgrt.