diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-03-21 19:40:56 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-04-14 17:29:56 +0200 |
commit | 9a8221568ada269d20c3e9d291ad5f9d07cac755 (patch) | |
tree | 025f098f3e98e3ae27105feb60dc76d4ff627452 /unsupported | |
parent | 36880cd61c52f13c6fd284aa23d42d9493d3ab2e (diff) |
Rework TTY column
* Rename internal identifier from TTY_NR to just TTY
* Unify column header on platforms
* Use devname(3) on BSD derivate to show the actual terminal,
simplifies current FreeBSD implementation.
* Use 'unsigned long int' as id type, to fit dev_t on Linux.
Only on Solaris the terminal path is not yet resolved.
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/UnsupportedProcess.c | 2 | ||||
-rw-r--r-- | unsupported/UnsupportedProcessList.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/unsupported/UnsupportedProcess.c b/unsupported/UnsupportedProcess.c index de95d089..def2a180 100644 --- a/unsupported/UnsupportedProcess.c +++ b/unsupported/UnsupportedProcess.c @@ -23,7 +23,7 @@ const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = { [PPID] = { .name = "PPID", .title = "PPID", .description = "Parent process ID", .flags = 0, .pidColumn = true, }, [PGRP] = { .name = "PGRP", .title = "PGRP", .description = "Process group ID", .flags = 0, .pidColumn = true, }, [SESSION] = { .name = "SESSION", .title = "SID", .description = "Process's session ID", .flags = 0, .pidColumn = true, }, - [TTY_NR] = { .name = "TTY_NR", .title = " TTY ", .description = "Controlling terminal", .flags = 0, }, + [TTY] = { .name = "TTY", .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, .pidColumn = true, }, [MINFLT] = { .name = "MINFLT", .title = " MINFLT ", .description = "Number of minor faults which have not required loading a memory page from disk", .flags = 0, .defaultSortDesc = true,}, [MAJFLT] = { .name = "MAJFLT", .title = " MAJFLT ", .description = "Number of major faults which have required loading a memory page from disk", .flags = 0, .defaultSortDesc = true, }, diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c index 010a83e9..81031487 100644 --- a/unsupported/UnsupportedProcessList.c +++ b/unsupported/UnsupportedProcessList.c @@ -54,6 +54,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { proc->pgrp = 0; proc->session = 0; proc->tty_nr = 0; + proc->tty_name = NULL; proc->tpgid = 0; proc->st_uid = 0; proc->processor = 0; |