La prise de conscience de votre propre ignorance est un grand pas vers la
connaissance.
-- Benjamin Disraeli
>-----Original Message-----
>From: Dan Milstein [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 09, 2001 6:34 AM
>To: [EMAIL PROTECTED]
>Subject: Re: FW: problem w/ ajp13 - if Tomcat is shutdown
>
>
>Henri,
>
>You say that checking errno isn't safe in a multithreaded env
>(which would
>certainly makes sense to me, since it looks like a global var).
>
>However, after searching online, and reading up in
>"Programming Threads", by
>Kleiman, Shah and Smaalders, I find on p. 47:
>
>"Each thread has its own independent version of the errno
>variable. This
>allows different threads to make system calls that may change
>the value of errno without interfering with each other."
>They are describing Posix threads. "errno" is actually a
>macro, apparently, which accesses the correct, thread-specific errno
variable.
Right, I checked in Linux errno.h for pthread
>Now, I am the first to admit that I don't understand all the weird
>intersections between threads and sockets in C, but this looks
>to me like checking errno against ECONNRESET may be fine.
More generally when you got a read error on TCP/IP stream
you could consider that the link to your server (tomcat) is broken :
- no more route to tomcat (broken lan or routers)
- server not working (tomcat was stopped or server restarted)
>Are there platforms where that's not true?
I've no idea but we migth have problems in differents interpretation
of platform.
>The nice thing about getting that ECONNRESET error, is it lets
>us go ahead and close out that connection, and try another one.
Done.
>We could even close out a whole cache of connections,
>which would most likely be the right thing to do.
Good idea, I'll find how to do that.
>If we loop/retry, than how do we know to close the connection?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]