summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-03-21 19:40:56 +0100
committercgzones <cgzones@googlemail.com>2021-04-14 17:29:56 +0200
commit9a8221568ada269d20c3e9d291ad5f9d07cac755 (patch)
tree025f098f3e98e3ae27105feb60dc76d4ff627452 /Process.h
parent36880cd61c52f13c6fd284aa23d42d9493d3ab2e (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 'Process.h')
-rw-r--r--Process.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Process.h b/Process.h
index 72197963..a0bdea74 100644
--- a/Process.h
+++ b/Process.h
@@ -28,7 +28,7 @@ typedef enum ProcessField_ {
PPID = 4,
PGRP = 5,
SESSION = 6,
- TTY_NR = 7,
+ TTY = 7,
TPGID = 8,
MINFLT = 10,
MAJFLT = 12,
@@ -84,11 +84,11 @@ typedef struct Process_ {
/* Foreground group identifier of the controlling terminal */
int tpgid;
- /*
- * Controlling terminal of the process.
- * The minor device number is contained in the combination of bits 31 to 20 and 7 to 0; the major device number is in bits 15 to 8.
- * */
- unsigned int tty_nr;
+ /* Controlling terminal identifier of the process */
+ unsigned long int tty_nr;
+
+ /* Controlling terminal name of the process */
+ char* tty_name;
/* User identifier */
uid_t st_uid;

© 2014-2024 Faster IT GmbH | imprint | privacy policy