For the Linux gurus:
I'm writing a program in fpc that does direct access to the tty using raw mode. I can't use the CRT unit because it initializes the screen and sends some escape sequences at the beginning of the program. Then I copied some parts of CRT unit like delay and setmode. I also created a function for checking if there are characters waiting to be readed from standard input.
function InputPending: boolean;
var
fdsin : fdSet;
begin
FD_Zero(fdsin);
fd_Set(0,fdsin);
InputPending:=(Select(1,@fdsin,nil,nil,nil)>0);
end;
Procedure Delay(DTime: Word);
Begin
Select(0,nil,nil,nil,DTime);
End;The program works right, but there is a problem. Randomly, some time after the program is running, it receives a SIGALRM from the system and it ends. I solved it by trapping this signal, but... anybody knows why it signal is generated?
