I've been looking all day for functions that will give me the
1. vt that the current process is running on
2. and the display it's running on.

I found a slow way of getting the active terminal with fgconsole.

Question 3:
I want to avoid the use of fgconsole because I'm calling another program from my program and then parsing the output.

That's 3 different things I'm looking for.
I need the vt and display of the process
and
fgconsole equivalent to get the number of the active vt.

I know this is a tough question because I've been looking so long.