Home GnuPG

Fix how environment variables are specified for spawn.
Concern Raisedfbe1f5153c3c

Description

Fix how environment variables are specified for spawn.

* src/gpgrt-int.h (_gpgrt_spawn_actions_set_envvars)
[HAVE_W32_SYSTEM]: Assume use with GetEnvironmentStrings.
(_gpgrt_spawn_actions_set_environ) [!HAVE_W32_SYSTEM]:
New.
* src/spawn-posix.c: Follow the change.
* src/spawn-w32.c: Can specify envvars now.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Auditors
Marius_Schamschula
werner
Provenance
gniibeAuthored on May 29 2024, 10:13 AM
Parents
rE6c05b35977c9: Cleaner semantics for _gpgrt_process_spawn without a callback.
Branches
Unknown
Tags
Unknown

Event Timeline

With the release of libgpg-error 1.50 I now get the following error:

libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -Wall -Wpointer-arith -MT libgpg_error_la-argparse.lo -MD -MP -MF .deps/libgpg_error_la-argparse.Tpo -c argparse.c  -fno-common -DPIC -o .libs/libgpg_error_la-argparse.o
spawn-posix.c:345:5: error: use of undeclared identifier 'environ'
    environ = act->environ;
    ^
1 error generated.

while attempting to update under MacPorts.

macOS 14.5 23F79 arm64
Xcode 15.4 15F31d
Apple clang version 15.0.0 (clang-1500.3.9.4)

This commit now has outstanding concerns.Jun 19 2024, 2:36 PM
werner added a subscriber: werner.

Please create a bug report instead of pointing to a specific commit. Sure the commit is helpful but w/o a bug report we can't track a bug. I'll do it for you this time ;-)