// Unpause container
555319
func (c *container) Unpause() {
	if c.Paused() {
		name := c.ActualName(false)
		c.startAcceleratedMounts()
		fmt.Fprintf(c.CommandsOut(), "Unpausing container %s ...\n", name)
		args := []string{"unpause", name}
		executeCommand("docker", args, c.CommandsOut(), c.CommandsErr())
	}
}
183127
func (p *Profile) RemoveUninteresting() error {
	var keep, drop *regexp.Regexp
	var err error

	if p.DropFrames != "" {
		if drop, err = regexp.Compile("^(" + p.DropFrames + ")$"); err != nil {
			return fmt.Errorf("failed to compile regexp %s: %v", p.DropFrames, err)
		}
		if p.KeepFrames != "" {
			if keep, err = regexp.Compile("^(" + p.KeepFrames + ")$"); err != nil {
				return fmt.Errorf("failed to compile regexp %s: %v", p.KeepFrames, err)
			}
		}
		p.Prune(drop, keep)
	}
	return nil
}
1078161
func (c *Container) Pause(ctx context.Context) error {
	if !c.container.State.Paused {
		if err := c.client.ContainerPause(ctx, c.container.ID); err != nil {
			return err
		}
		return c.updateInnerContainer(ctx)
	}
	return nil
}
1210946
func UnpauseCommand(factory app.ProjectFactory) cli.Command {
	return cli.Command{
		Name:  "unpause",
		Usage: "Unpause services.",
		// ArgsUsage: "[SERVICE...]",
		Action: app.WithProject(factory, app.ProjectUnpause),
	}
}
360838
func GetPauseImage(cfg *kubeadmapi.ClusterConfiguration) string {
	return GetGenericImage(cfg.ImageRepository, "pause", constants.PauseVersion)
}
816900
func (ds *dockerService) initCleanup() {
	errors := ds.platformSpecificContainerInitCleanup()

	for _, err := range errors {
		klog.Warningf("initialization error: %v", err)
	}
}
684223
func (c *Client) UnfreezeIndex(name string) *IndicesUnfreezeService {
	return NewIndicesUnfreezeService(c).Index(name)
}
408332
func (h *Haptic) Unpause() error {
	return errorFromInt(int(
		C.SDL_HapticUnpause(h.cptr())))
}
245217
func (daemon *Daemon) Cleanup(container *container.Container) {
	daemon.releaseNetwork(container)

	if err := container.UnmountIpcMount(); err != nil {
		logrus.Warnf("%s cleanup: failed to unmount IPC: %s", container.ID, err)
	}

	if err := daemon.conditionalUnmountOnCleanup(container); err != nil {
		// FIXME: remove once reference counting for graphdrivers has been refactored
		// Ensure that all the mounts are gone
		if mountid, err := daemon.imageService.GetLayerMountID(container.ID, container.OS); err == nil {
			daemon.cleanupMountsByID(mountid)
		}
	}

	if err := container.UnmountSecrets(); err != nil {
		logrus.Warnf("%s cleanup: failed to unmount secrets: %s", container.ID, err)
	}

	if err := mount.RecursiveUnmount(container.Root); err != nil {
		logrus.WithError(err).WithField("container", container.ID).Warn("Error while cleaning up container resource mounts.")
	}

	for _, eConfig := range container.ExecCommands.Commands() {
		daemon.unregisterExecCommand(container, eConfig)
	}

	if container.BaseFS != nil && container.BaseFS.Path() != "" {
		if err := container.UnmountVolumes(daemon.LogVolumeEvent); err != nil {
			logrus.Warnf("%s cleanup: Failed to umount volumes: %v", container.ID, err)
		}
	}

	container.CancelAttachContext()

	if err := daemon.containerd.Delete(context.Background(), container.ID); err != nil {
		logrus.Errorf("%s cleanup: failed to delete container from containerd: %v", container.ID, err)
	}
}
469060
func (c *client) QueuePause() error {
	uri := fmt.Sprintf(pathQueue, c.addr)
	err := c.delete(uri)
	return err
}
565777
func (c *Container) Stop(timeout time.Duration) error {
	dc, err := getDockerClient()
	if err != nil {
		return err
	}
	return dc.StopContainer(c.ID, uint(timeout.Seconds()))
}
930864
func (s *Session) unpair() error {
	if !s.verified {
		return fmt.Errorf("Unpair requires that the PIN be verified")
	}
	return s.Channel.Unpair()
}
1175064
func (m *Mounter) Unmount(
	devPath string,
	path string,
	flags int,
	timeout int,
	opts map[string]string,
) error {
	m.Lock()
	// device gets overwritten if opts specifies fuse mount with
	// options.OptionsDeviceFuseMount.
	device := devPath
	path = normalizeMountPath(path)
	if value, ok := opts[options.OptionsDeviceFuseMount]; ok {
		// fuse mounts show-up with this key as device.
		device = value
	}
	info, ok := m.mounts[device]
	if !ok {
		m.Unlock()
		logrus.Warnf("Unable to unmount device %q path %q: %v",
			devPath, path, ErrEnoent.Error())
		return ErrEnoent
	}
	m.Unlock()
	info.Lock()
	defer info.Unlock()
	for i, p := range info.Mountpoint {
		if p.Path != path {
			continue
		}
		err := m.mountImpl.Unmount(path, flags, timeout)
		if err != nil {
			return err
		}
		// Blow away this mountpoint.
		info.Mountpoint[i] = info.Mountpoint[len(info.Mountpoint)-1]
		info.Mountpoint = info.Mountpoint[0 : len(info.Mountpoint)-1]
		m.maybeRemoveDevice(device)
		if options.IsBoolOptionSet(opts, options.OptionsDeleteAfterUnmount) {
			m.RemoveMountPath(path, opts)
		}

		return nil
	}
	logrus.Warnf("Device %q is not mounted at path %q", device, path)
	return nil
}
1262625
func (p *Project) StopWithTimeout(containerID string, timeout int) error {
	timeoutDuration := time.Duration(timeout) * time.Second

	return p.Client.ContainerStop(context.Background(), containerID, &timeoutDuration)
}
1239159
func (rl *referencedRWLayer) Unmount() error {
	return rl.layerStore.driver.Put(rl.mountedLayer.mountID)
}
259017
func (s *ServerRPC) PodUnpause(ctx context.Context, req *types.PodUnpauseRequest) (*types.PodUnpauseResponse, error) {
	err := s.daemon.UnpausePod(req.PodID)
	if err != nil {
		return nil, err
	}

	return &types.PodUnpauseResponse{}, nil
}
108168
func (rwg *RepeatedWaitGroup) WaitUnlessPaused(ctx context.Context) (
	bool, error) {
	paused, isIdleCh, pauseCh := func() (bool, chan struct{}, chan struct{}) {
		rwg.lock.Lock()
		defer rwg.lock.Unlock()
		if !rwg.paused && rwg.pauseCh == nil {
			rwg.pauseCh = make(chan struct{})
		}
		return rwg.paused, rwg.isIdleCh, rwg.pauseCh
	}()

	if isIdleCh == nil {
		return false, nil
	}

	if paused {
		return true, nil
	}

	select {
	case <-isIdleCh:
		return false, nil
	case <-pauseCh:
		return true, nil
	case <-ctx.Done():
		return false, ctx.Err()
	}
}