forked from security/hakurei
container: use /proc/self/exe directly
This is a more reliable form of pathname to self and also cheaper than os.Executable. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -525,7 +525,7 @@ func New(ctx context.Context, msg message.Msg) *Container {
|
||||
p := &Container{ctx: ctx, msg: msg, Params: Params{Ops: new(Ops)}}
|
||||
c, cancel := context.WithCancel(ctx)
|
||||
p.cancel = cancel
|
||||
p.cmd = exec.CommandContext(c, MustExecutable(msg))
|
||||
p.cmd = exec.CommandContext(c, fhs.ProcSelfExe)
|
||||
return p
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user