[fpc-pascal] Stopping daemon in linux

Michael Van Canneyt michael at freepascal.org
Mon Nov 9 21:51:09 CET 2009



On Mon, 9 Nov 2009, Jonas Maebe wrote:

>
> On 09 Nov 2009, at 21:03, Michael Van Canneyt wrote:
>
>> On Mon, 9 Nov 2009, "Vinzent Höfler" wrote:
>> 
>>> As wrong as in "Don't call most system functions from within a signal 
>>> handler.", maybe?
>> 
>> Hmm... In that case, many exceptions would not work either ?
>
> The sigaction handlers for catching exceptions have been fixed quite a while 
> ago already to only collect the necessary information from the signal 
> context, and to then return from the signal handler to the start of the RTL 
> function that handles run time errors, passing this info as arguments (we can 
> pass at least 3 items on every platform by modifying the parameter register 
> contents in the signal context; we also change the instruction pointer in the 
> context so that it returns to the RTL's runerror handler rather than to 
> wherever the signal was triggered).

Hm. 
Quite complex code, and not processor independent.
Is there not a more generic way of handling this ?

Michael.


More information about the fpc-pascal mailing list