From 9a8221568ada269d20c3e9d291ad5f9d07cac755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sun, 21 Mar 2021 19:40:56 +0100 Subject: 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. --- Process.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Process.h') 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; -- cgit v1.2.3