New oom sync (#257)
* Vendor in runc afaa21f79ade3b2e99a68f3f15e7219155aa4662 This updates the Dockerfile to use go 1.6.2 and install pkg-config are both are now needed by runc. Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Add support for runc create/start operation Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Remove dependency on runc state directory for OOM handler Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Add OOM test Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
cf554d59dd
commit
8040df4e89
214 changed files with 215 additions and 30135 deletions
|
@ -23,6 +23,9 @@ type Process interface {
|
|||
// This is either "init" when it is the container's init process or
|
||||
// it is a user provided id for the process similar to the container id
|
||||
ID() string
|
||||
// Start unblocks the associated container init process.
|
||||
// This should only be called on the process with ID "init"
|
||||
Start() error
|
||||
CloseStdin() error
|
||||
Resize(int, int) error
|
||||
// ExitFD returns the fd the provides an event when the process exits
|
||||
|
@ -252,3 +255,13 @@ func getControlPipe(path string) (*os.File, error) {
|
|||
func (p *process) Signal(s os.Signal) error {
|
||||
return syscall.Kill(p.pid, s.(syscall.Signal))
|
||||
}
|
||||
|
||||
// Start unblocks the associated container init process.
|
||||
// This should only be called on the process with ID "init"
|
||||
func (p *process) Start() error {
|
||||
if p.ID() == InitProcessID {
|
||||
_, err := fmt.Fprintf(p.controlPipe, "%d %d %d\n", 2, 0, 0)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue