Date: Tue, 21 Nov 2000 18:32:51 -0800 From: "jl" <tech@scsr.com> To: "Nicolai Petri" <nicolai@petri.cc>, <freebsd-hackers@freebsd.org> Subject: Re: SIGPIPE in multithread http server. Message-ID: <008801c0542c$82e1bc60$6503c23f@XGforce.com> References: <01ad01c0542c$5d4d38d0$6732a8c0@atomic.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <nicolai@petri.cc>
To: <freebsd-hackers@freebsd.org>
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 majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the
message
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008801c0542c$82e1bc60$6503c23f>
