aboutsummaryrefslogtreecommitdiffstats
path: root/src/visibility.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-10-11 07:17:53 +0000
committerNIIBE Yutaka <[email protected]>2024-10-11 07:29:02 +0000
commit1860f6407f834b681c21f67db7236eaad161524c (patch)
tree81e1fee4007e1b70fad278f9716fd65fcc28a7e4 /src/visibility.c
parentw32: Fix releasing memory for UTF-8 text. (diff)
downloadlibgpg-error-1860f6407f834b681c21f67db7236eaad161524c.tar.gz
libgpg-error-1860f6407f834b681c21f67db7236eaad161524c.zip
spawn: Add new function to modify environment.
* src/gpg-error.def.in (gpgrt_spawn_actions_set_envchange): New. * src/gpg-error.vers (gpgrt_spawn_actions_set_envchange): New. * src/gpg-error.h.in (gpgrt_spawn_actions_set_envchange): New. * src/gpgrt-int.h (_gpgrt_spawn_actions_set_envchange): New. * src/spawn-posix.c (struct gpgrt_spawn_actions): New field ENVCHANGE. (prepare_environ): New. (my_exec): Take care of ENVCHANGE. (_gpgrt_spawn_actions_set_envchange): New. * src/spawn-w32.c (struct gpgrt_spawn_actions): New field ENVCHANGE. (prepare_env_block): New. (_gpgrt_spawn_actions_set_envchange): New. (spawn_detached, _gpgrt_process_spawn): Take care of ENVCHANGE. * src/visibility.c (gpgrt_spawn_actions_set_envchange): New. * src/visibility.h (gpgrt_spawn_actions_set_envchange): New. * tests/Makefile.am (TESTS): Add t-spawn. * tests/t-spawn.c: New. -- GnuPG-bug-id: 7307 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src/visibility.c')
-rw-r--r--src/visibility.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/visibility.c b/src/visibility.c
index 0e8121e..15b38b4 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1145,6 +1145,13 @@ gpgrt_spawn_actions_release (gpgrt_spawn_actions_t act)
_gpgrt_spawn_actions_release (act);
}
+void
+gpgrt_spawn_actions_set_envchange (gpgrt_spawn_actions_t act,
+ const char *const *env)
+{
+ _gpgrt_spawn_actions_set_envchange (act, env);
+}
+
#ifdef HAVE_W32_SYSTEM
void
gpgrt_spawn_actions_set_envvars (gpgrt_spawn_actions_t act,