| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
| To: | cygwin AT cygwin DOT com |
| From: | Bob Cousins <bobcousins34 AT hotmail DOT com> |
| 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: | <loom.20040701T163520-968@post.gmane.org> |
| References: | <loom DOT 20040630T190035-117 AT post DOT gmane DOT org> |
| Mime-Version: | 1.0 |
| 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 <bobcousins34 <at> 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 <stdio.h>
#include <pthread.h>
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |