Fixed with new GPGRT_PROCESS_STDIO_NUL flag.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Jul 18 2025
Jul 17 2025
Jul 16 2025
Jul 15 2025
Pushed the changes:
- Inheriting HANDLEs has been not working accurately
- Before the fix, all HANDLEs were inherited
- Only specified HANDLEs are inherited by: rE0b01950237ab: w32:spawn: Fix inheriting HANDLEs.
- HANDLEs by w32_open_null were leaked
T7723 fix by rE311fb769d1dd: w32:spawn: New flag GPGRT_PROCESS_STDIO_NUL.
Before implementing this feature, it's better to fix T7723: gpgrt:w32: Fix for inheriting stdin/stdout/stderr with "NUL", and do some clean up.
If we will fix gpgconf using GPGRT_PROCESS_STDIO_NUL, we will need to fix gpg-connect-agent to see if it's NUL or not.
Jul 11 2025
Here is an experimental change to support the feature.
Jul 9 2025
Jun 26 2025
Jun 23 2025
Jun 11 2025
I looked at it but we probably need to rework/update the entire libtool stuff which has a high regression risk. Thus I give this bug a low priority because it is not a functional bug.
Jun 5 2025
May 15 2025
Apr 24 2025
Apr 23 2025
Apr 22 2025
doc/HACKING says it's OK to use variadic arg macros (from C99 features).
If it's OK, this patch can fix the initialization (which silences GCC 15 warnings):
Apr 21 2025
Apr 17 2025
Apr 9 2025
Note that 1.53 was released today which fixes a small regression:
Apr 8 2025
Jan 22 2025
In case of build problems related to a failed test you may want to apply rEb6df311368133df90c3bf338fbf5c90bd8d950f8.
Jan 14 2025
@werner I read the code of gpgme/src/posix-io.c. I understand the two points:
- For the correctness sake, the possible interrupted closefrom should be handled.
- we can share the code with closefrom case and non-closefrom case.
Jan 8 2025
@gniibe: Please see gpgme/src/posix-io.c where we have this:
Thank you for your report.
Jan 7 2025
Hm, this might also be relevant in GnuPG's codebase in common/exechelp-posix.c, which contains a copy of the same code (licensed differently).
Jan 6 2025
Dec 20 2024
This problem has gone in libgpg-error 1.51, since the implementation doesn't use environ any more.
Nov 12 2024
Fixed in 1.51, by introducing gpgrt_spawn_actions_set_env_rev, which assumes utf-8 encoding.
Fixed in 1.51.
Fixed in 1.51.
Nov 11 2024
Oct 31 2024
Oct 23 2024
Thanks. Fixed in: rEd14c69a7f256: Avoid use of 'nullptr' for an identifier.
Oct 22 2024
The C comittee is getting more an more absurd by adding new keywords. Breaking software for fun and funding. Workaround should be easy: Don't use the C23 option.
Oct 11 2024
With the change, T7169 is fixed (by side-effect).
Pushed the change: rE1860f6407f83: spawn: Add new function to modify environment.
Oct 10 2024
Thanks for opening a bug report. This is better for our workflow.
Oct 9 2024
Replacing gpgrt_spawn_actions_set_environ by gpgrt_spawn_actions_set_envchange is not good, as it's exported and already used.
Oct 4 2024
Sep 27 2024
Here is my attempt:
Sep 25 2024
Fixed in 2.2 with: rGc33523a0132e047032c4d65f9dedec0297bfbef3
Sep 17 2024
Fixed GnuPG 2.4 in: rG730593affa91: common:w32: Don't expose unused functions.
libgpg-error fix is done in: rEc2a713fe11e3: w32:spawn: Remove unused function get_max_fds.
Sep 9 2024
I'd vote for the second (utf-8) which is more aligned with our other APIs.
Since CreateProcessW allows two ways for lpEnvironment (one is ANSI environment block, another is Unicode environment block), if we want to support these two ways for users' of gpgrt spawn API, we would offer either:
I'm talking about CreateProcessW and how a user of gpgrt spawn API can specify lpEnvironment (when needed).
The environment is a property of the C runtime and well defined as a block of concatenated C-strings terminated by a zero length C-string. In case of wmain the C-strings use wchar_t and not char.
Please note that gpgrt_spawn_actions_set_envvars is W32 specific API in libgpg-error. Currently, the behavior with ASCII string is defined.
The patch is an answer in future if we want to extend the semantics supporting UTF-8.
Sep 6 2024
String values are stored as UTF-16, but might not even contain a terminating doublezero since it can be any binary data. Note that on Windows the registry can be used to set environment variables. There "Edit binary data" shows exactly what is in the regkey. So if you use regedit with the String functions you can see that they are converted from latin1 to UTF-16.
The problem might be that we use getenv all over the place and don't specify the content. Frankly, it is not 100% clear to me whether the value of an enbvar need to be a string or can be arbitrary data sans nul? However, I can't remember that I ever wrote any code which did not assume ascii or utf8 for the value.
Here is my attempt:
Sep 5 2024
Use of execve is better (avoiding use of environ).
Aug 7 2024
Setting this to testing. Could be tested as described in https://dev.gnupg.org/T7188#188093 by verifying that the logged debug messages also use correct encoding.
Aug 5 2024
Okay. Done in gpgme for gpgrt >= 1.51 (T7188).
Aug 2 2024
Sounds like a good idea.
@werner Would it be okay to call gettext_use_utf8 (3) in gpgme's do_subsystem_inits where we currently call gettext_use_utf8 (1)? See https://dev.gnupg.org/source/gpgme/browse/master/src/version.c$77