[GAP] Asynchroneus IO on Mac OS X

Ted Baker baker at cs.fsu.edu
Sun Sep 10 00:16:49 CEST 2006


On Sat, Sep 09, 2006 at 03:52:48PM +0200, Arnaud Charlet wrote:
> > I would be interested in hearing about the resolution of this
> > problem.
> 
> Sure, tickets opened by GAP members are accessible to all members.
> 
> > When I wrote the code for signal handling I do not think
> > I made any distinction for SIGIO.
> 
> The main issue I believe (but I would need to see the code, etc...)
> is that some signals simply cannot be handled using sigwait, and must
> be handled via sigaction.

Yes.  That is the way it looks.  To refresh my memory, I just took
a look at s-interr.adb in the gcc 2.8.1 version of Gnat.  I
understand that this may have changed, but that is the version I
am currently using on my system.  In task body Server_Task, I see
"IMOP.Install_Default_Action (IMNG.Interrupt_ID (Interrupt));" and
later a call to Interrupt_Wait.  In s-inmaop.adb, function
Interrupt_Wait I see that it is using sigwait.

I guess maybe Max-OS-X does not support sigwait, or does not support
it for signals whose default action is ignore.  I don't believe it is
safe in general to use the non-threaded way of attaching a null handler
and then using sigsuspend, since the effect of sigsuspend is defined to
be on the whole process.  Of course, you can't just attach the interrupt
entry to the signal directly using sigaction, since then you would not
get the full Ada entry semantics.

--Ted
> 
> Arno
> _______________________________________________
> GAP mailing list
> GAP at gnat.info
> /no-more-mailman.html
> To unsubscribe from this list, please contact the GAP GNAT Tracker administrator
> within your organization.


More information about the GAP mailing list