This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.5.9-1: socket() appears NOT to be thread-safe


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]