gethostname is thread-safe?

2004-05-07 Thread electa
i'm using gethostname in a multithreaded code ando sometimes i get error. i think it's not a bug of my code (and i post it) because it does not happed always, but sometimes. maybe gethostname() thread-unsafe? the code: in_addr_t get_my_IP() { char name[255]; //store my hostname (hostname are l

Re: gethostname is thread-safe?

2004-05-07 Thread Jacek Trzmiel
> THE ERROR IS: > ERROR gethostbyname() failed, h_errno=-1 > Description: (null) > ERROR socket() failed, Errno= 1 > Description: Operation not permitted http://cygwin.com/ml/cygwin/2004-05/msg00191.html Best regards, Jacek. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Pro