Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opencontainers/runc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5a98014e253ed029f20761a2e17f8f977a056d17
Choose a base ref
..
head repository: opencontainers/runc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 76cabbc9af622c94ba02769dce8baa214da4ef19
Choose a head ref
Showing with 2 additions and 4 deletions.
  1. +1 −2 libcontainer/rootfs_linux.go
  2. +1 −2 libcontainer/standard_init_linux.go
3 changes: 1 addition & 2 deletions libcontainer/rootfs_linux.go
Original file line number Diff line number Diff line change
@@ -195,8 +195,7 @@ func prepareRootfs(pipe *syncSocket, iConfig *initConfig) (err error) {
return &os.PathError{Op: "chdir", Path: config.Rootfs, Err: err}
}

if iConfig.Config.HasHook(configs.CreateContainer) {
s := iConfig.SpecState
if s := iConfig.SpecState; s != nil {
s.Pid = unix.Getpid()
s.Status = specs.StateCreating
if err := iConfig.Config.Hooks.Run(configs.CreateContainer, s); err != nil {
3 changes: 1 addition & 2 deletions libcontainer/standard_init_linux.go
Original file line number Diff line number Diff line change
@@ -268,8 +268,7 @@ func (l *linuxStandardInit) Init() error {
// https://github.com/torvalds/linux/blob/v4.9/fs/exec.c#L1290-L1318
_ = l.fifoFile.Close()

if l.config.Config.HasHook(configs.StartContainer) {
s := l.config.SpecState
if s := l.config.SpecState; s != nil {
s.Pid = unix.Getpid()
s.Status = specs.StateCreated
if err := l.config.Config.Hooks.Run(configs.StartContainer, s); err != nil {