Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: Chris Faylor Date: Thu, 12 Aug 1999 17:28:37 -0400 To: chikayama AT klic DOT org Cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: B20.1: Setitimer provides virtual timer? Message-ID: <19990812172837.A9981@cygnus.com> Reply-To: cygwin AT sourceware DOT cygnus DOT com References: <19990812112810X DOT chik AT klic DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <19990812112810X.chik@klic.org>; from chikayama@klic.org on Thu, Aug 12, 1999 at 11:28:10AM +0900 It's not implemented in Cygwin currently. Actually, I don't know of any way to implement it, period. -chris On Thu, Aug 12, 1999 at 11:28:10AM +0900, chikayama AT klic DOT org wrote: >"setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM >signals. The test program included below, that sets the process timer >and loops awaiting for timer expiration, will loop forever. However, >running this in background and sending the signal by "kill -VTALRM ..." >from the shell will terminate it as expected (with an exclamation mark >output). > >Is this the spec. of the current release or a bug? > ># I really enjoy using Cygwin. Thank you for your efforts! > >-- Takashi Chikayama AT Dept. of Frontier Informatics., the Univ. of Tokyo >-- Tel. +81-3-5841-6658; Fax. +81-3-5841-8572 >-- E-mail chikayama AT klic DOT org; Home page http://www.logos.t.u-tokyo.ac.jp > >#include >#include >#include >#include >#include > >volatile int time_has_come; > >void handler(int signal) >{ > time_has_come = 1; > fprintf(stderr, "!\n"); > return; >} > >struct itimerval interval; > >int main(int argc, char * const argv[]) >{ > interval.it_interval.tv_sec = 0; > interval.it_interval.tv_usec = 0; > interval.it_value.tv_sec = 1; > interval.it_value.tv_usec = 0; > signal(SIGVTALRM, handler); > (void) setitimer(ITIMER_VIRTUAL, &interval, NULL); > time_has_come = 0; > while (1) { > if (time_has_come) { > exit(0); > } > } >} > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com