bool exited = false;
int signal = 0;
int exit_status = 0;
- const char *status_cstr = NULL;
if (WIFSTOPPED(status))
{
signal = WSTOPSIG(status);
- status_cstr = "STOPPED";
DNBLogThreadedIf(LOG_PROCESS, "waitpid (%i) -> STOPPED (signal = %i)", child_pid, signal);
}
else if (WIFEXITED(status))
{
exit_status = WEXITSTATUS(status);
- status_cstr = "EXITED";
exited = true;
DNBLogThreadedIf(LOG_PROCESS, "waitpid (%i) -> EXITED (status = %i)", child_pid, exit_status);
}
else if (WIFSIGNALED(status))
{
signal = WTERMSIG(status);
- status_cstr = "SIGNALED";
if (child_pid == abs(pid))
{
DNBLogThreadedIf(LOG_PROCESS, "waitpid (%i) -> SIGNALED and EXITED (signal = %i)", child_pid, signal);
nub_thread_t thread_id = iter->first;
uint64_t activity_id = iter->second;
ActivityList::const_iterator activity_search;
- bool found_activity_for_this_thread = false;
for (activity_search = activities.begin(); activity_search != activities.end(); ++activity_search)
{
if (activity_search->activity_id == activity_id)
{
- found_activity_for_this_thread = true;
ThreadActivitySP thread_activity_sp (new ThreadActivity());
thread_activity_sp->current_activity = *activity_search;
threads_used_usec.push_back(used_usec);
}
- kr = mach_port_deallocate(mach_task_self(), threads[i]);
+ mach_port_deallocate(mach_task_self(), threads[i]);
}
- kr = mach_vm_deallocate(mach_task_self(), (mach_vm_address_t)(uintptr_t)threads, tcnt * sizeof(*threads));
+ mach_vm_deallocate(mach_task_self(), (mach_vm_address_t)(uintptr_t)threads, tcnt * sizeof(*threads));
}
#define RAW_HEXBASE std::setfill('0') << std::hex << std::right
++offset;
}
// Now skip all arguments
- for (int i=0; i<static_cast<int>(argc); ++i)
+ for (uint32_t i = 0; i < argc; ++i)
{
- cstr = data.GetCStr(&offset);
+ data.GetCStr(&offset);
}
// Now iterate across all environment variables
#else // #if defined (WITH_SPRINGBOARD) || defined (WITH_BKS)
// When root, show all processes
bool all_users = (our_uid == 0);
- result = GetProcesses (plistMutableArray.get(), all_users);
+ GetProcesses (plistMutableArray.get(), all_users);
#endif
CFReleaser<CFDataRef> plistData (::CFPropertyListCreateXMLData (alloc, plistMutableArray.get()));