delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/20/13:55:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 20 Mar 2002 11:23:54 -0500
From: Christopher Faylor <cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Cc: rgibson AT MIT DOT EDU
Subject: Re: alarm();pause();alarm();pause(); doesn't pause in pthread
Message-ID: <20020320162354.GF2762@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, rgibson AT MIT DOT EDU
References: <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20020320010350 DOT 0211c960 AT po12 DOT mit DOT edu>
Mime-Version: 1.0
In-Reply-To: <5.1.0.14.0.20020320010350.0211c960@po12.mit.edu>
User-Agent: Mutt/1.3.23.1i

On Wed, Mar 20, 2002 at 01:03:53AM -0500, Rob Gibson wrote:
>DLL version 1.3.10, running on Windows ME.  I checked the message boards, 
>but did not see this.
>
>Call this code X: {
>   alarm(2);
>   pause();
>   cout << "A";
>   alarm(4);
>   pause();
>   cout << "B";
>   alarm(4);
>   pause();
>   cout << "C";
>   alarm(4);
>   pause();
>   cout << "D";
>}
>
>
>I have two threads.  In the first, my original startup thread, I register a 
>sig handler for SIGALRM.  At this point, if I block the SIGALRM signal, 
>then run X, nothing happens.  Ok.  (If I unblock SIGALRM, I get four calls 
>to my sig handler, spaced the appropriate number of seconds apart.  Ok.)
>
>Now I start a second thread using pthread_create().  In the second thread's 
>function, if I immediately run code X, nothing happens, because my second 
>thread has inherited the blocked nature of SIGALRM.  Ok.

signals do not work with anything but the main thread.  Sorry.

cgf
--
Please do not send me personal email with cygwin questions.
Use the resources at http://cygwin.com/ .

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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