X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48EA6051.5060803@cs.unipr.it> Date: Mon, 06 Oct 2008 21:00:33 +0200 From: Roberto Bagnara User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050929 Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc4 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: "The Parma Polyhedra Library developers' list" Subject: Cygwin 1.7: signal handler not invoked (regression from 1.5) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (spartacus.cs.unipr.it [160.78.167.140]); Mon, 06 Oct 2008 21:00:34 +0200 (CEST) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi there, the following shows a problem in Cygwin 1.7 that is not present in Cygwin 1.5: roberto AT sissi /tmp $ cat bug.c #include #include #include #include volatile int alarm_called = 0; void alarm(int sig) { alarm_called = 1; } int main() { unsigned long i; struct itimerval it; it.it_interval.tv_sec = 0; it.it_interval.tv_usec = 0; /* 100,000 microseconds. */ it.it_value = (struct timeval) { 0, 100000 }; signal(SIGALRM, alarm); setitimer(ITIMER_REAL, &it, (struct itimerval *) 0); for (i = 0; i <= 2000000000; ++i) if (alarm_called) break; if (alarm_called) printf("alarm() called\n"); else printf("alarm() NOT called\n"); return 0; } roberto AT sissi /tmp $ gcc -v Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug Thread model: posix gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) roberto AT sissi /tmp $ gcc bug.c roberto AT sissi /tmp $ time ./a.exe alarm() NOT called real 0m7.203s user 0m7.201s sys 0m0.015s roberto AT sissi /tmp $ As you see, the alarm() function is not invoked as it should (and as it is in Cygwin 1.5). All the best, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara AT cs DOT unipr DOT it -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/