LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   console exclusivity to application (https://www.linuxquestions.org/questions/programming-9/console-exclusivity-to-application-84185/)

byronm 08-21-2003 10:11 AM

console exclusivity to application
 
I am writing an application that requires a quasi realtime display using ncurses that runs in a standard text ("virtual"?) console.

My problem is knowing what to do to ensure that nothing else will write to this terminal and hence corrupt what is displayed.

It seems that my efforts so far are corrupted primarily by
- occasional system/kernal messages
- and even echos from other virtual terminals (e.g. echo "Hello" > /dev/tty1) appear and corrupt the display
(There may be other daemons just waiting to add to this list that I am not yet aware of)

Is there a programming solution to make what appears on the console under the exclusive control of the application that is running within it?
:newbie:

Hko 08-21-2003 11:56 AM

1) change the init scripts sysklogd, klogd and maybe some others so the daemons will not write to the console. e.g. for klogd specify "-c 2" option.

2) don't echo to the terminal. Only root or the same user can do it, so you're in control of this yourself.

You probably thought about this yourself. More seriously: I wouldn't know really how to do that in a program, and I doubt if it is really possible. Interesting question however...


All times are GMT -5. The time now is 10:42 AM.