Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Mon, 21 May 2001 20:48:54 -0400
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Strange fork() behaviour under cygwin v1.3.1
Message-ID: <20010521204854.A17791@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <EA18B9FA0FE4194AA2B4CDB91F73C0EF79E6@itdomain002.itdomain.net.au> <20010521200657.C17520@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.11i
In-Reply-To: <20010521200657.C17520@redhat.com>; from cgf@redhat.com on Mon, May 21, 2001 at 08:06:57PM -0400

On Mon, May 21, 2001 at 08:06:57PM -0400, Christopher Faylor wrote:
>On Tue, May 22, 2001 at 09:56:01AM +1000, Robert Collins wrote:
>>> -----Original Message-----
>>> From: Andrew de Quincey [mailto:andrew@orbital.co.uk]
>>> Sent: Tuesday, May 22, 2001 9:01 AM
>>> To: cygwin@cygwin.com
>>> Subject: Strange fork() behaviour under cygwin v1.3.1
>>> 
>>> 
>>> 
>>> Hi, I've been playing with the jabber server under win32... 
>>> and I've run
>>> into a slight problem. The following program illustrates it:
>>> 
>>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>> #include <pth.h>
>>
>>Whats <pth.h> ? If it's the GNU portable threads library, and it's using
>>a native thread library instead of 100% emulated threads, make sure its
>>using pthreads, not win32 threads. (Explanation: Cygwin is ignorant of
>>direct win32 thread calls you might make, but it knows about pthreads).
>
>That's not entirely true.  Cygwin should be aware of the fact that the
>fork is running in a thread and should duplicate the thread state
>correctly.
>
>The end result will be a child process with a main thread which is a copy
>of the thread that called fork in the parent.

I just checked and this still works in 1.3.2 for at least a simple test case.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

