Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 To: cygwin AT cygwin DOT com From: Bob Cousins Subject: Re: 1.5.10: Problem with =?utf-8?b?U0lHRVZfVEhSRUFE?= Date: Thu, 1 Jul 2004 14:42:37 +0000 (UTC) Lines: 87 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 62.254.217.180 (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)) Bob Cousins hotmail.com> writes: > > I am having a problem with timer notifications using SIGEV_THREAD. I adapted > the sigev_thread.c program from > http://homepage.mac.com/dbutenhof/Threads/source.html to illustrate problem. The problem appears to be related to the timer thread terminating. The problem also occurs if you use non-timer thread. The attached program illustrates this. If you run it and repeatedly press "return" it usually (not always) hangs when the child thread exits. ------------------------------------------ #include #include void * athread (void *arg) { sleep (1); printf ("exit\n"); return NULL; } int count; main() { char cmd [1024]; char *pcmd; pthread_t id; pthread_create (&id, NULL, athread, NULL); printf ("test>"); while (1) { pcmd = gets (cmd); if (pcmd == NULL) { printf ("pcmd = NULL\n"); } else { printf ("test> %d",++count); } } return 0; } -- 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/