You should have the thread call signal() to ignor the
sigpipe signal so the thread won't hang.
======================================
WWW.XGFORCE.COM
The Next Generation Load Balance and
Fail Safe Server Clustering Software
for the Internet.
======================================
----- Original Message -----
From: Nicolai Petri <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 6:31 PM
Subject: SIGPIPE in multithread http server.
> I hope someone can help me with this issue..
>
> When the application recieves a SIGPIPE the thread
hangs hard.. What is the
> correct thing to do when a socket is closed by the
remote end ??
>
> The fault happens each time I'll hit reload in my
browser while there's
> still a connection open (while downloading a large
page).. It blocks my http
> server hard... No new connections is accepted.. But
other non-socket threads
> runs nicely in the backgrund..
>
> My current signal-handler looks like this :
> ---------
> void ignoreSignal(int signalId _UNUSED_) {
> closeNwSocket(&newSock);
> (void)setsignal(SIGPIPE, ignoreSignal);
> }
> ---------
> I'll bet this is very wrong... But what is the correct
code for cleaning the
> session up ??
>
> Best regards,
> Nicolai Petri
>
>
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the
message
>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message