delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/05/18/22:53:21

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <023001c0e00e$9e96c9a0$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-developers AT cygwin DOT com>
References: <20010518221107 DOT A12195 AT redhat DOT com> <021a01c0e00b$e8d48dc0$0200a8c0 AT lifelesswks> <20010518224535 DOT A26035 AT redhat DOT com>
Subject: Re: pthread gotchas
Date: Sat, 19 May 2001 12:51:34 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 19 May 2001 02:44:43.0703 (UTC) FILETIME=[A8C4A470:01C0E00D]

----- Original Message -----
From: "Christopher Faylor" <cgf AT redhat DOT com>
To: <cygwin-developers AT cygwin DOT com>
Sent: Saturday, May 19, 2001 12:45 PM
Subject: Re: pthread gotchas


> On Sat, May 19, 2001 at 12:32:10PM +1000, Robert Collins wrote:
> >>work with pthreads.  I ran the program on linux.
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm just guessing here, but you would like me to actually read what you
write? I guess that mental telepathy isn't as good as we thought :]

>
> This email was talking about linux.  I ran the program on linux first
so
> that I could get a feel for how it was supposed to work and was
> surprised to find that linux broke my perceptions.

openBSD  test results:

in subproc, sleeping
in parent, starting thread, pid 12819in tf, waiting for 12819
0 = pthread_create
in subproc, exiting
12819 = waitpid
waitpid: Undefined error: 0
returning
0 = pthread_join
exiting

> I have included my test program below.  The waitpid, which is invoked
in
> the secondary thread fails unless I move the fork into the same
thread.

I haven't looked into why yet.

> #include <stdio.h>
> #include <pthread.h>
> #include <wait.h>

btw: wait.h should be sys/wait according to the SUS.

Rob



- Raw text -


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