hasInit tells whether the container init process exists.
()
| 892 | |
| 893 | // hasInit tells whether the container init process exists. |
| 894 | func (c *Container) hasInit() bool { |
| 895 | if c.initProcess == nil { |
| 896 | return false |
| 897 | } |
| 898 | pid := c.initProcess.pid() |
| 899 | stat, err := system.Stat(pid) |
| 900 | if err != nil { |
| 901 | return false |
| 902 | } |
| 903 | if stat.StartTime != c.initProcessStartTime || stat.State == system.Zombie || stat.State == system.Dead { |
| 904 | return false |
| 905 | } |
| 906 | return true |
| 907 | } |
| 908 | |
| 909 | func (c *Container) isPaused() (bool, error) { |
| 910 | state, err := c.cgroupManager.GetFreezerState() |
no test coverage detected