Subject: Re: save/restore fpu for the signal handler call
To: Jason Thorpe <thorpej@shagadelic.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-i386
Date: 12/06/2005 12:25:45
Jason Thorpe <thorpej@shagadelic.org> writes:

> On Nov 30, 2005, at 12:26 PM, der Mouse wrote:
> 
> > I thought you could provided the main line wasn't using the same
> > FILE *
> > when the signal arrived.  Is that wrong?  If so, is it wrong for us
> > with our stdio, or just wrong in that it's not promised by the spec
> > but
> > works for us?
> 
> POSIX has a (very short) list of functions that are defined to be
> async signal safe.  printf() is not in that list.

As is pointed out later in the thread, those are just the functions
that are defined to be always-safe. The remaining functions are *not*
always-unsafe; they are only unsafe if the signal could have
interrupted an unsafe function call, and it's quite possible to
arrange for that to not be the case when the signal is unblocked.

        - Nathan