delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/14/06:43:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <00c901c4220d$47f6eaa0$0200a8c0@em.noip.com>
From: "Enzo Michelangeli" <em AT em DOT no-ip DOT com>
To: <cygwin AT cygwin DOT com>
Subject: 1.5.9-1: socket() appears NOT to be thread-safe
Date: Wed, 14 Apr 2004 18:42:44 +0800
MIME-Version: 1.0

While porting to Cygwin the Linux application "sipd"
(http://www.sxdesign.com/index.php?page=developer&submnu=sipd ), which
uses pthreads, I noticed that socket() calls issued concurrently by
several threads often failed, with strerror(errno) saying "operation not
permitted". Once I protected all the calls with mutex locks, such errors
went away. Is Cygwin's implementation of socket() known to be
thread-unsafe?

Enzo

P.S. I have written an implementation of the missing gethostbyname_r(),
based on a mutex-protected call to gethostbyname(). If useful, I may
gladly contribute the code.


--
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/

- Raw text -


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