This is the mail archive of the
mailing list for the Cygwin project.
Re: Signal handling in tight loops
- To: cygwin at cygwin dot com
- Subject: Re: Signal handling in tight loops
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Tue, 7 Aug 2001 12:39:05 -0400
- References: <3B6FCBC5.720C9785@paradise.net.nz>
- Reply-To: cygwin at cygwin dot com
On Tue, Aug 07, 2001 at 11:06:45PM +1200, Edmund Horner wrote:
>>From my DJGPP days I remember that the alarm signal could not be raised
>in very tight loops, because signals were only checked when memory was
>accessed. Does this apply to cygwin, by any chance?
>The reason I'm asking is that I have a module in my program which I
>can't completely trust, and I'd like to terminate it after 2 minutes if
>it hasn't returned by then. I'm hoping to use alarm() for this.
Why don't you write a simple test case?
This technique should be much more useful than inviting random opinions from
a mailing list and it should be MUCH faster.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html