github.com/amylindburg/docker@v1.7.0/daemon/graphdriver/aufs/mount.go (about)

     1  package aufs
     2  
     3  import (
     4  	"os/exec"
     5  	"syscall"
     6  
     7  	"github.com/Sirupsen/logrus"
     8  )
     9  
    10  func Unmount(target string) error {
    11  	if err := exec.Command("auplink", target, "flush").Run(); err != nil {
    12  		logrus.Errorf("Couldn't run auplink before unmount: %s", err)
    13  	}
    14  	if err := syscall.Unmount(target, 0); err != nil {
    15  		return err
    16  	}
    17  	return nil
    18  }