code: func stopDaemon(proc *os.Process) (bool, error) {
  	err := proc.Signal(syscall.Signal(syscall.SIGTERM))
  
  	if err == nil { // no need to wait for the SIGTERM if the signal failed
  		increment := 50 * time.Millisecond
  		for d := increment; d < 3*time.Second; d += increment {
  			time.Sleep(d)
  			if _, err := findProcess(proc.Pid); err != nil {
  				return true, nil
  			}
  		}
  	}
  
  	err = proc.Kill()
  	if err != nil {
  		return false, errs.NewErrorExitError("Could not stop daemon.", err)
  	}
  
  	return false, nil
  }
docs: // stopDaemon stops the daemon process. It returns a bool indicating if the
  // shutdown was graceful.