Jonas Maebe <jonas.ma...@elis.ugent.be>:

> 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, [...]

Additionally, signals causing run-time exceptions are triggered by the code 
itself, meaning things like SIGSEGV[*] are not actually "interrupting", rather 
they synchronously "transfer control" in a relatively well-defined way.

Maybe the analogy to good ol' DOS programming helps: Then signals are just 
interrupts, "synchronous" signals are "int xx" instructions, while 
"asynchronous" are real "hardware interrupts". Unfortunately you'll never know 
which will be which. ;)


Vinzent.

[*] Of course, the SIGSEGV still could have been sent from another process 
making it interrupting and asynchronous like any other signal.
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to