[fpc-devel] sleep and SIGINT on 2.4.0

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Nov 26 11:05:38 CET 2009


beld wrote on do, 26 nov 2009:

> hi, freepascal developers
>
> I found a question about 2.4.0 yesterday and do some check today.
>
> in Kylix 3: the Ctrl+C whill break the "sleep" call, and fpc 2.2.4 do same.
>
> but in 2.4.0, Ctrl+C is handled, but "sleep" is sleeping yet.

Many cases were fixed in FPC 2.4.0 whereby interrupted system calls  
were not restarted. This was also done for the sysutils sleep()  
function, so that if the sleep is interrupted for whatever reason, it  
is resumed afterwards.

It is debatable what the correct behaviour is of a high level  
function. I personally think that if you want to rely on Unix  
behaviour (i.e., that a signal interrupts a system call), you should  
call the unix functions directly rather than high level wrappers in  
sysutils.


Jonas

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the fpc-devel mailing list