delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/11/17:37:46

From: "Igor Siemienowicz" <igorsiem AT onaustralia DOT com DOT au>
To: <djgpp AT delorie DOT com>
Subject: Re: signal() and alarm() - Bug?
Date: Wed, 12 Mar 1997 08:57:19 +1000
MIME-Version: 1.0
Message-Id: <23120970302297@onaustralia.com.au>

From: Caspar Derksen <caspard AT sci DOT kun DOT nl>

> I have the following problem: I want to perform some possibly expensive
> computation that I want to abort if no result is found in time. I have
> implemented this under Unix using alarm(). If some time limit is
exceeded,
> an alarm signal is raised that is handled by some procedure restoring
> the previous state of the program.
> 
> With DJGPP, alarm() or signal() does not seem to work, although the
> FAQ suggests that signals and alarm should work. I am using v2 under
> Win95-DOS. Would v2.01 solve my problem? Does anyone known another
> solution?

Wouldn't it be simpler and more reliable to poll the clock throughout the
calculation. It's not like that's a hugely expensive operation
computationally.

Just a thought.

--
Igor Siemienowicz
igor AT onaustralia DOT com DOT au

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019