fix: env var leak in tr_spawn_async() (#2212)

* fix: env var leak in tr_spawn_async()
This commit is contained in:
Charles Kerr
2021-11-24 13:25:23 -06:00
committed by GitHub
parent d4e0f368c8
commit dbd9130d9d
5 changed files with 90 additions and 111 deletions

View File

@@ -8,6 +8,13 @@
#pragma once
#include <map>
#include <string_view>
#include "tr-macros.h"
bool tr_spawn_async(char* const* cmd, char* const* env, char const* work_dir, struct tr_error** error);
bool tr_spawn_async(
char const* const* cmd,
std::map<std::string_view, std::string_view> const& env,
char const* work_dir,
struct tr_error** error);