Merge pull request #617 from LK4D4/stop_transient_unit

Stop systemd unit on destroy
This commit is contained in:
Mrunal Patel 2015-06-09 10:22:12 -07:00
commit 688ec20a4a
1 changed files with 1 additions and 0 deletions

View File

@ -259,6 +259,7 @@ func (m *Manager) Apply(pid int) error {
func (m *Manager) Destroy() error { func (m *Manager) Destroy() error {
m.mu.Lock() m.mu.Lock()
defer m.mu.Unlock() defer m.mu.Unlock()
theConn.StopUnit(getUnitName(m.Cgroups), "replace")
if err := cgroups.RemovePaths(m.Paths); err != nil { if err := cgroups.RemovePaths(m.Paths); err != nil {
return err return err
} }