Lines Matching defs:pid
51 IsSBProcess (nub_process_t pid)
53 CFReleaser<CFArrayRef> appIdsForPID (::SBSCopyDisplayIdentifiersForProcessID(pid));
117 MachProcess::SetProcessID(pid_t pid)
121 // Set the current PID appropriately
122 if (pid == 0)
125 m_pid = pid;
126 return m_pid; // Return actualy PID in case a zero pid was passed in
312 // Clear any cached thread list while the pid and task are still valid
411 DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Kill() DoSIGSTOP() ::ptrace (PT_KILL, pid=%u, 0, 0) => 0x%8.8x (%s)", m_pid, err.Error(), err.AsString());
452 err.LogThreadedIfError("kill (pid = %d, signo = %i)", ProcessID(), signal);
544 nub_process_t pid = m_pid;
545 int ret = ::ptrace (PT_DETACH, pid, (caddr_t)1, 0);
548 err.LogThreaded("::ptrace (PT_DETACH, %u, (caddr_t)1, 0)", pid);
1458 MachProcess::AttachForDebug (pid_t pid, char *err_str, size_t err_len)
1462 if (pid != 0)
1466 if (::getpgid (pid) < 0)
1475 m_pid = pid;
1478 if (IsSBProcess(pid))
1485 DNBLogThreadedIf(LOG_PROCESS, "error: failed to attach to pid %d", pid);
1491 if (::ptrace (PT_ATTACHEXC, pid, 0, 0))
1502 DNBLogThreadedIf(LOG_PROCESS, "successfully attached to pid %d", pid);
1508 DNBLogThreadedIf(LOG_PROCESS, "error: failed to attach to pid %d", pid);
1585 // for that token, then the pid will be returned, otherwise INVALID_NUB_PROCESS
1767 DNBLogThreadedIf(LOG_PROCESS, "successfully spawned pid %d", m_pid);
1774 DNBLogThreadedIf(LOG_PROCESS, "error: failed to attach to spawned pid %d (err = %i, errno = %i (%s))", m_pid, err, ptrace_err.Error(), ptrace_err.AsString());
1869 pid_t pid = INVALID_NUB_PROCESS;
1921 err.SetError( ::posix_spawnp (&pid, path, &file_actions, &attr, (char * const*)argv, (char * const*)envp), DNBError::POSIX);
1923 err.LogThreaded("::posix_spawnp ( pid => %i, path = '%s', file_actions = %p, attr = %p, argv = %p, envp = %p )", pid, path, &file_actions, &attr, argv, envp);
1932 err.SetError( ::posix_spawnp (&pid, path, NULL, &attr, (char * const*)argv, (char * const*)envp), DNBError::POSIX);
1934 err.LogThreaded("::posix_spawnp ( pid => %i, path = '%s', file_actions = %p, attr = %p, argv = %p, envp = %p )", pid, path, NULL, &attr, argv, envp);
1938 // looking pid even when an error was returned, so clear it out
1940 pid = INVALID_NUB_PROCESS;
1952 if (pid != INVALID_NUB_PROCESS)
1954 cpu_type_t pid_cpu_type = MachProcess::GetCPUTypeForLocalProcess (pid);
1955 DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s ( ) pid=%i, cpu_type=0x%8.8x", __FUNCTION__, pid, pid_cpu_type);
1968 return pid;
1972 MachProcess::GetCPUTypeForLocalProcess (pid_t pid)
1979 mib[len] = pid;
2005 pid_t pid = pty.Fork(pty_error);
2007 if (pid < 0)
2012 return pid;
2014 else if (pid == 0)
2030 ::setpgid (0, 0); // Set the child process group to match its pid
2051 ::setpgid (pid, pid); // Set the child process group to match its pid
2061 return pid;
2103 DNBLogThreadedIf(LOG_PROCESS, "successfully attached to pid %d", m_pid);
2108 DNBLogThreadedIf(LOG_PROCESS, "error: failed to attach to pid %d", m_pid);
2269 nub_process_t pid = INVALID_NUB_PROCESS;
2270 Boolean pid_found = SBSProcessIDForDisplayIdentifier(bundleIDCFStr, &pid);
2272 // A return PID of 0 means the process is not running, which may be because it hasn't been (asynchronously) started
2278 DNBLogThreadedIf(LOG_PROCESS, "%s() polling Springboard for pid for %s...", __FUNCTION__, bundleID.c_str());
2279 pid_found = SBSProcessIDForDisplayIdentifier(bundleIDCFStr, &pid);
2292 DNBLogThreadedIf(LOG_PROCESS, "%s() => pid = %4.4x", __FUNCTION__, pid);
2298 return pid;