[fpc-pascal]Controlling TTY output
md
md at realmwireless.com
Tue Oct 31 23:21:36 CET 2000
FPC developers:
Here is a brain teaser.
Let us say we have two environments:
1) Normal BASH shell with prompt in TTY1 - The TERM environment
variable will be set to linux
2) KDE Destktop - The TERM environment variable will be set to xterm
Under the non-x window environment, how do we fork() / execlp( ) another
process so that the new child process
will use a different Ttty console to output its writeln( ) information
to.
Under KDE, I can execute a fork() with execlp( ) and the command line
will be as follows 'konsole -e /bin/application arg1'
The net effect of this is that the parent process continues in its own
console window and the child process will execute
in a separte console window. The input/output of each process is now
separate to each window.
Under non-xwindows environments, .i.e. normal bash shell, How do we
fork() / exec( ) a process so that it will be assigned a different TTY
or some other means of having a separate console for each process.
What this also means that the login process for a given TTY is skipped
or avoided so the processes that are started from
the runlevel 3 inittab file can spawn processes that will take over a
given console.
This is different that just logging into a bunch of different consoles
and running each process on a given console. This is where the code is
assigning processes to consoles.
Any help would be appreciated.
Mark Diener
md at realmwireless.com
More information about the fpc-pascal
mailing list