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 Date: Tue, 25 Jun 2002 11:53:51 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cygwin-1.3.11-3 Problem with Privoxy (pthreads problem?) Message-ID: <20020625155351.GA11650@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20020625012539 DOT GI32490 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23.1i On Tue, Jun 25, 2002 at 10:11:11AM -0500, D. N. Knisely wrote: >I don't think that multiple versions of cygwin1.dll is the problem. >Coincidentally, this system is a recent clean install of XP without too much >built-up crud. I searched and found one extra copy (that came along with >xplanet), but that wasn't running. Even after deleting it, the same problem >occurs: > >Jun 25 14:00:31 Privoxy(1628300860) Error: can't fork: No error > >Further inspection of privoxy suggests that whoever added CYGWIN hooks chose >to use threads rather than forking, so it is actually a Posix threads >problem. When I disabled Posix thread use (which reverts to using fork), it >started working with 1.3.11. Here is the code that no longer works; I have >no experience with Posix threads: > >#if defined(FEATURE_PTHREAD) && !defined(SELECTED_ONE_OPTION) >#define SELECTED_ONE_OPTION > { > pthread_t the_thread; > pthread_attr_t attrs; > > pthread_attr_init(&attrs); > pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED); > child_id = (pthread_create(&the_thread, &attrs, > (void*)serve, csp) ? -1 : 0); > pthread_attr_destroy(&attrs); > } >#endif > >child_id is ending up as -1. Did anything change in this area in 1.3.11? Yes, actually. Nice catch! I've changed the subject so that people who were working on pthreads will comment. Thanks for tracking this down so nicely. If only all of the "1.3.11 is broke" messages had this level of attention to detail... cgf -- 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/