[fpc-pascal]redirecting prog under Linux

Andreas K. Foerster Andreas at AKFoerster.de
Sat Mar 30 09:27:04 CET 2002


Hello,

I start a program like this:

procedure run(Prog: string);
var pid    : longint;
    status : longint;
begin
pid := fork;
if pid=0 then
   begin
   Execl(Prog);
   runerror;
   end;
waitpid(pid, @status, 0);
end;

How is it possible to run it on a different virtual terminal? 
Say /dev/tty2 for example.
Can I automaticaly switch to this VT?

(The program is meant to run just in a special environment, so I know
which terminals are free)

-- 
Tschuess
	Andreas




More information about the fpc-pascal mailing list