// existsPID check exists pid process.
979939
func existsPID(pid int) bool {
	_, err := os.FindProcess(pid)
	if err != nil {
		return false
	}

	return true
}
1170369
func (p *Process) GetPid() int {
	if p.command != nil && p.command.Process != nil {
		return p.command.Process.Pid
	}
	return p.status.Pid
}
913560
func Exists(args ...string) bool {
	if _, err := Raw(append([]string{"-C"}, args...)...); err != nil {
		return false
	}
	return true
}
505235
func isWaitable(pid int) (bool, error) {
	si := &siginfo{}
	_, _, e := unix.Syscall6(unix.SYS_WAITID, _P_PID, uintptr(pid), uintptr(unsafe.Pointer(si)), unix.WEXITED|unix.WNOWAIT|unix.WNOHANG, 0, 0)
	if e != 0 {
		return false, os.NewSyscallError("waitid", e)
	}

	return si.si_pid != 0, nil
}
1243153
func (r RedisPipeline) Exists(key string) *redis.BoolCmd {
	return r.pipeline.Exists(key)
}
1317610
func (l *Layer0) Exists(id string) bool {
	id = l.realID(id)
	return l.Driver.Exists(id)
}
972914
func (d *Driver) Exists(id string) bool {
	path := path.Join(virtPath, id)

	_, err := os.Stat(path)

	if err == nil {
		return true
	} else {
		return false
	}
}
942962
func (s *RPCServer) ProcessPid(arg ProcessPidIn, out *ProcessPidOut) error {
	out.Pid = s.debugger.ProcessPid()
	return nil
}
145103
func (s *ProcessDetails) SetPid(v int64) *ProcessDetails {
	s.Pid = &v
	return s
}
1285386
func (d *Driver) Exists(id string) bool {
	return d.DeviceSet.HasDevice(id)
}
420138
func (d *Driver) Exists(id string) bool {
	rID, err := d.resolveID(id)
	if err != nil {
		return false
	}
	result, err := hcsshim.LayerExists(d.info, rID)
	if err != nil {
		return false
	}
	return result
}
653955
func findProcessWithPID(pid int) (ps.Process, error) {
	matchPID := func(p ps.Process) bool { return p.Pid() == pid }
	procs, err := findProcessesWithFn(ps.Processes, matchPID, 1)
	if err != nil {
		return nil, err
	}
	if len(procs) == 0 {
		return nil, nil
	}
	return procs[0], nil
}
1131718
func (p *FsBlockstoreProvider) Exists(ledgerid string) (bool, error) {
	exists, _, err := util.FileExists(p.conf.getLedgerBlockDir(ledgerid))
	return exists, err
}
1015353
func (d *ExistsResult) Exists() bool {
	return d.keyState != gocbcore.KeyStateNotFound && d.keyState != gocbcore.KeyStateDeleted
}
168653
func (s Int64Slice) Exists(x int64) bool {
	i := s.Search(x)
	if i == len(s) {
		return false
	}

	return s[i] == x
}
160554
func (s *Service) Exists() (bool, error) {
	// In any error case, we just say it doesn't exist with this configuration.
	// Subsequent calls into the Service will give the caller more useful errors.
	_, same, _, err := s.existsAndSame()
	if err != nil {
		return false, errors.Trace(err)
	}
	return same, nil
}
753474
func (d *Daemon) Pid() (int, error) {
	pid, err := ioutil.ReadFile(d.PidFileName)
	if err != nil {
		return 0, err
	}
	p, err := strconv.Atoi(string(bytes.TrimSpace(pid)))
	if err != nil {
		return 0, fmt.Errorf("%s: invalid process id", d.PidFileName)
	}
	return p, nil
}