[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Broken pipe?



Jeg har lokaliseret fejlen. Jeg forstår den dog ikke og det var kun ved ren
og skær trial'n'error jeg fandt frem til den.

Jeg har følgende stykke kode som jeg kalder før jeg henter en side. Et
simpelt nslookup:

 struct hostent *mhost;
 mhost = gethostbyname(hostname);
 if( mhost != NULL )
 {
     strcpy(host_ip, inet_ntoa(*((struct in_addr *)mhost->h_addr)));
....

Fjerner jeg det, så kommer der ingen broken pipes (men så duer mit program
jo ikke). Er der nogle interne strukturer som gethostbyname/inet_ntoa deler
med andre dele af socket-implementationen, der kan få min multitråedet
wget-dims til at fejle? Det er umiddelbart den eneste forklaring jeg kan
finde. Det undrer mig dog meget, at selv med en tråd så fejler det stadig?

...og inden jeg spammer denne liste med flere dumme spørgsmål, er der så
nogen der kan anbefale en god FAQ/Guide til trådprogrammering? :-)

----- Original Message ----- 
From: "Thomas Salling" <sslug@sslug>
To: <sslug@sslug>
Sent: Saturday, August 09, 2003 11:52 AM
Subject: [CPROG] Broken pipe?


Hej,

Mit problem er at send giver mig broken pipes konstant. I alle tidligere
client/servere jeg har lavet har broken pipe ikke forekommet ret meget. Her
er et eksempel på hvor ekstremt det er:
Nogen ideer?












 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *