From 2ee50d030178cede83eb9d0005fbc19f819d30fe Mon Sep 17 00:00:00 2001 From: Graham Inggs Date: Mon, 5 Feb 2018 14:48:51 +0200 Subject: Imported Upstream version 2.1.0 --- darwin/DarwinProcessList.c | 3 ++- darwin/Platform.c | 10 +++++----- darwin/Platform.h | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'darwin') diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c index 7492f82..9aad8b4 100644 --- a/darwin/DarwinProcessList.c +++ b/darwin/DarwinProcessList.c @@ -171,7 +171,8 @@ void ProcessList_goThroughEntries(ProcessList* super) { DarwinProcess_setFromKInfoProc(&proc->super, &ps[i], tv.tv_sec, preExisting); DarwinProcess_setFromLibprocPidinfo(proc, dpl); - DarwinProcess_scanThreads(proc); + // Disabled due to bug in macOS High Sierra + // DarwinProcess_scanThreads(proc); super->totalTasks += 1; diff --git a/darwin/Platform.c b/darwin/Platform.c index 9274d0d..1dce8b6 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -33,7 +33,7 @@ in the source distribution for its full text. ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; -SignalItem Platform_signals[] = { +const SignalItem Platform_signals[] = { { .name = " 0 Cancel", .number = 0 }, { .name = " 1 SIGHUP", .number = 1 }, { .name = " 2 SIGINT", .number = 2 }, @@ -69,7 +69,7 @@ SignalItem Platform_signals[] = { { .name = "31 SIGUSR2", .number = 31 }, }; -unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem); +const unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem); ProcessFieldData Process_fields[] = { [0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, }, @@ -78,8 +78,8 @@ ProcessFieldData Process_fields[] = { [STATE] = { .name = "STATE", .title = "S ", .description = "Process state (S sleeping, R running, D disk, Z zombie, T traced, W paging)", .flags = 0, }, [PPID] = { .name = "PPID", .title = " PPID ", .description = "Parent process ID", .flags = 0, }, [PGRP] = { .name = "PGRP", .title = " PGRP ", .description = "Process group ID", .flags = 0, }, - [SESSION] = { .name = "SESSION", .title = " SESN ", .description = "Process's session ID", .flags = 0, }, - [TTY_NR] = { .name = "TTY_NR", .title = " TTY ", .description = "Controlling terminal", .flags = 0, }, + [SESSION] = { .name = "SESSION", .title = " SID ", .description = "Process's session ID", .flags = 0, }, + [TTY_NR] = { .name = "TTY_NR", .title = " TTY ", .description = "Controlling terminal", .flags = 0, }, [TPGID] = { .name = "TPGID", .title = " TPGID ", .description = "Process ID of the fg process group of the controlling terminal", .flags = 0, }, [MINFLT] = { .name = "MINFLT", .title = " MINFLT ", .description = "Number of minor faults which have not required loading a memory page from disk", .flags = 0, }, [MAJFLT] = { .name = "MAJFLT", .title = " MAJFLT ", .description = "Number of major faults which have required loading a memory page from disk", .flags = 0, }, @@ -166,7 +166,7 @@ ProcessPidColumn Process_pidColumns[] = { { .id = TPGID, .label = "TPGID" }, { .id = TGID, .label = "TGID" }, { .id = PGRP, .label = "PGRP" }, - { .id = SESSION, .label = "SESN" }, + { .id = SESSION, .label = "SID" }, { .id = 0, .label = NULL }, }; diff --git a/darwin/Platform.h b/darwin/Platform.h index 29ef289..1231217 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -22,9 +22,9 @@ in the source distribution for its full text. extern ProcessField Platform_defaultFields[]; -extern SignalItem Platform_signals[]; +extern const SignalItem Platform_signals[]; -extern unsigned int Platform_numberOfSignals; +extern const unsigned int Platform_numberOfSignals; extern ProcessFieldData Process_fields[]; -- cgit v1.2.3