2014-07-17 07:39:15 +08:00
|
|
|
// +build linux,cgo
|
2014-07-15 03:49:50 +08:00
|
|
|
|
2014-02-25 13:21:35 +08:00
|
|
|
package native
|
|
|
|
|
|
|
|
|
|
type info struct {
|
|
|
|
|
ID string
|
2015-07-28 08:43:22 +08:00
|
|
|
driver *Driver
|
2014-02-25 13:21:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsRunning is determined by looking for the
|
2014-02-27 11:19:14 +08:00
|
|
|
// pid file for a container. If the file exists then the
|
2014-02-25 13:21:35 +08:00
|
|
|
// container is currently running
|
|
|
|
|
func (i *info) IsRunning() bool {
|
2015-03-06 01:55:14 +08:00
|
|
|
_, ok := i.driver.activeContainers[i.ID]
|
|
|
|
|
return ok
|
2014-02-25 13:21:35 +08:00
|
|
|
}
|