This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Semaphors Problem
- From: John Love-Jensen <eljay at adobe dot com>
- To: Manal Helal <manalorama at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Mon, 07 May 2007 06:18:56 -0500
- Subject: Re: Semaphors Problem
Hi Manal,
> then I get this in the run time: The call was interrupted by a signal handler.
It sounds like your signal handler is violating the very limited constraints
of what a signal handler can do.
Take a look at your sigaction constraints in your "man sigaction". That
lists which functions can be called from within a signal handler. My bet is
that the signal handler is using routines (directly or indirectly) not in
that list.
I strongly recommend that the signal handler be written in such a way as to
minimize the signal interruption. For my own, I usually just set a flag and
return, and then act upon that flag in the main code at an appropriate time.
HTH,
--Eljay