blob: 49d1b626cb449693814ab424aacadbb78491d243 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Author: arnej
package prog
import (
"github.com/vespa-engine/vespa/client/go/util"
)
func (spec *Spec) Run() error {
prog := spec.Program
args := spec.Args
if spec.shouldUseValgrind {
args = spec.prependValgrind(args)
prog = args[0]
} else if spec.shouldUseNumaCtl {
args = spec.prependNumaCtl(args)
prog = args[0]
}
if spec.shouldUseVespaMalloc {
spec.Setenv(ENV_LD_PRELOAD, spec.vespaMallocPreload)
}
envv := spec.effectiveEnv()
return util.Execvpe(prog, args, envv)
}
|