Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
vc: drop container SetPid API
Browse files Browse the repository at this point in the history
It is not used by anyone.

Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Jul 23, 2019
1 parent ff5f1b4 commit f886c0b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
10 changes: 0 additions & 10 deletions virtcontainers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,16 +368,6 @@ func (c *Container) GetPid() int {
return c.process.Pid
}

// SetPid sets and stores the given pid as the pid of container's process.
func (c *Container) SetPid(pid int) error {
c.process.Pid = pid

if !c.sandbox.supportNewStore() {
return c.storeProcess()
}
return nil
}

func (c *Container) setStateFstype(fstype string) error {
c.state.Fstype = fstype

Expand Down
1 change: 0 additions & 1 deletion virtcontainers/documentation/api/1.0/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ type VCContainer interface {
ID() string
Sandbox() VCSandbox
Process() Process
SetPid(pid int) error
}
```

Expand Down
1 change: 0 additions & 1 deletion virtcontainers/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,4 @@ type VCContainer interface {
ID() string
Sandbox() VCSandbox
Process() Process
SetPid(pid int) error
}
6 changes: 0 additions & 6 deletions virtcontainers/pkg/vcmock/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ func (c *Container) GetPid() int {
return c.MockPid
}

// SetPid implements the VCContainer function of the same name.
func (c *Container) SetPid(pid int) error {
c.MockPid = pid
return nil
}

// GetAnnotations implements the VCContainer function of the same name.
func (c *Container) GetAnnotations() map[string]string {
return c.MockAnnotations
Expand Down

0 comments on commit f886c0b

Please sign in to comment.