aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/env.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-09-06 10:19:51 -0700
committerTobias Bosch <tbosch@google.com>2019-09-06 23:11:42 +0000
commit7d811f440f3dc7de8ae7f0faa8044fe6751f4944 (patch)
tree091ff6fe39e8b3a6161c705cc7e59f90581f207f /compiler_wrapper/env.go
parent367e8a932d78a4037bf0acdbc62fae8f3f46be99 (diff)
downloadtoolchain-utils-7d811f440f3dc7de8ae7f0faa8044fe6751f4944.tar.gz
Use libc execve instead of syscall.Execve
Also create a dynamically linked binary. BUG=chromium:1000863 TEST=manual test against portage sandbox Change-Id: I36db7eac14466f41fbc1f0a41979039d8eaa1d83 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1789670 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/env.go')
-rw-r--r--compiler_wrapper/env.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler_wrapper/env.go b/compiler_wrapper/env.go
index 399ba354..71e4c7ef 100644
--- a/compiler_wrapper/env.go
+++ b/compiler_wrapper/env.go
@@ -10,7 +10,6 @@ import (
"io"
"os"
"strings"
- "syscall"
)
type env interface {
@@ -73,7 +72,7 @@ func (env *processEnv) stderr() io.Writer {
func (env *processEnv) exec(cmd *command) error {
execCmd := newExecCmd(env, cmd)
- return syscall.Exec(execCmd.Path, execCmd.Args, execCmd.Env)
+ return libcExecve(execCmd.Path, execCmd.Args, execCmd.Env)
}
func (env *processEnv) run(cmd *command, stdin io.Reader, stdout io.Writer, stderr io.Writer) error {