[fpc-pascal] modifying system.pp's InstallSignals
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Mar 31 16:05:11 CEST 2009
On 31 Mar 2009, at 15:53, Vincent Snijders wrote:
> Seth Grover schreef:
>> Does that seem like the right way for me to get the functionality of
>> those calls available to me in InstallSignals? Or is there something
>> easier I'm missing?
>
> I don't think it can be done without editing the system unit. If you
> are willing to do that, I would add a procvar called
> CustomSignalHandler: TProcedure in the interface section of the
> system unit (or in an include file included in the interface section
> of the system unit).
>
> In the signal handler of the system unit, test
> assigned(CustomSignalHandler) and call it, if it is assigned, else
> do the current thing.
In general this works well, but not in this case, since InstallSignals
is called from the system unit's initialization code, and that's the
first code that is executed when a program starts up.
Jonas
More information about the fpc-pascal
mailing list