mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/configs: add HookList.SetDefaultEnv
1. Make CommandHook.Command a pointer, which reduces the amount of data being copied when using hooks, and allows to modify command hooks. 2. Add SetDefaultEnv, which is to be used by the next commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -1256,8 +1256,8 @@ func createHooks(rspec *specs.Spec, config *configs.Config) {
|
||||
}
|
||||
}
|
||||
|
||||
func createCommandHook(h specs.Hook) configs.Command {
|
||||
cmd := configs.Command{
|
||||
func createCommandHook(h specs.Hook) *configs.Command {
|
||||
cmd := &configs.Command{
|
||||
Path: h.Path,
|
||||
Args: h.Args,
|
||||
Env: h.Env,
|
||||
|
||||
Reference in New Issue
Block a user