mirror of
https://github.com/opencontainers/runc.git
synced 2025-12-24 11:50:58 +08:00
libct: createExecFifo: optimize
Every time we call container.Config(), a new copy of
struct Config is created and returned, and we do it twice here.
Accessing container.config directly fixes this.
Fixes: 805b8c73d ("Do not create exec fifo in factory.Create")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -432,11 +432,11 @@ func (c *Container) signal(s os.Signal) error {
|
||||
}
|
||||
|
||||
func (c *Container) createExecFifo() (retErr error) {
|
||||
rootuid, err := c.Config().HostRootUID()
|
||||
rootuid, err := c.config.HostRootUID()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rootgid, err := c.Config().HostRootGID()
|
||||
rootgid, err := c.config.HostRootGID()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user