If I compile and run my example program and then press Crtl+C the 
program terminates. I would expect that it terminate by calling 
"CloseServer" procedure, but it dos not. If the program terminates 
normally (time runs out) the "CloseServer" procedure is called as 
expected.

Have I misunderstood something about the ExitProc.
   
Regards Carsten

program exitp;
Uses sysutils;    {System}


var
  ExitProcGem:pointer;

Procedure CloseServer;
Begin
  ExitProc:=ExitProcGem;
  WriteLn('Server closed.');
End;
begin
  ExitProcGem:=ExitProc;
  ExitProc:[EMAIL PROTECTED];
  sleep(10000);
  WriteLn('--Close--');
end.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to