[fpc-pascal]CTRL + Break

Lee, John LeeJ at logica.com
Fri Jul 20 11:59:31 CEST 2001


Something like this test program could do it...Put your stuff in the sigint:
branch... 

program tst;

uses ctrl_c;

var  NewSignal,OldSigSegm,OldSigInt : SignalHandler;
Function CatchSignal(Sig : longint):longint;
begin
  case Sig of
   SIGSEGV : begin
             { Temporary message - until we get an error number... }
               writeln ('Panic : Internal compiler error, exiting.');
               Halt(99);
             end;
    SIGINT : begin
              WriteLn('Ctrl-C Signaled!');
              Halt(1);
             end;
  end;
  CatchSignal:=0;
end;

begin
{must be doing i/o otherwise ctrl/c does not work}
 repeat write('.'); until false;
end.

> 




More information about the fpc-pascal mailing list