One way to check this is this way:
final String xmsg = Exception.getMessage();
if( (xmsg != null) && xmsg.equals("Interrupted system call") )
{
// count the number of repeats of this and perhaps retry
}
-- -
|._.|_ Udo K. Schuermann "The future's not what it used to be."
|( )| ) [EMAIL PROTECTED] -- G'Kar, Babylon 5, "The Long Dark"
|_:_|/ Senior Software Engineer, Blackboard Inc. Sum ergo cogito!
Blackboard - Bringing Education Online -----> http://www.Blackboard.com
On Fri, Dec 15, 2000 at 11:08:47AM +0530, Santosh Dawara wrote:
> Phew, I thought someone unsubscribed me from the list because of
> the question, I had not received any reply for four days straight.
>
> To be honest I can't retry the read operation because I would
> go into a Hard loop if a real SocketException occured due to
> some other reason. So I will use a count to keep track of the
> number of times it occured.
>
> Anyhow, the reason why this happens is still not clear.
> Someone here must have something to say about this. I have
> never seen this happen on Windows.
>
> Thanks,
> Santosh Dawara.
> http://cravelinux.cjb.net
>
> Udo K Schuermann wrote:
> >
> > I don't know if my own experience has a significantly different cause,
> > but I get a SocketException with a "Resource temporarily unavailable"
> > message if I'm waiting for input and the thread is interrupted. Merely
> > catching the exception and retrying the read operation is all that is
> > required; what the interruption allows you to do is respond to the
> > interrupt if necessary.
> >
> > Perhaps that helps?
> >
> > -- -
> > |._.|_ Udo K. Schuermann "The future's not what it used to be."
> > |( )| ) [EMAIL PROTECTED] -- G'Kar, Babylon 5, "The Long Dark"
> > |_:_|/ Senior Software Engineer, Blackboard Inc. Sum ergo cogito!
> > Blackboard - Bringing Education Online -----> http://www.Blackboard.com
> >
> > > Date: Tue, 12 Dec 2000 11:51:11 +0530
> > > From: Santosh Dawara <[EMAIL PROTECTED]>
> > > Subject: Socket Exception out of Nowhere !!
> > >
> > > Hi All,
> > > ...
> > > I noticed that, if one session is active, and
> > > If I open another session with the Server, a SocketException
> > > is thrown in the existing session.
> > >
> > > Reproduced below is the relevant stack trace:
> > > java.net.SocketException: Interrupted system call
> > > at java.net.SocketInputStream.socketRead(Native Method)
> > > at java.net.SocketInputStream.read(SocketInputStream.java:90)
> > > at java.net.SocketInputStream.read(SocketInputStream.java:71)
> > > at java.io.InputStreamReader.fill(InputStreamReader.java:163)
> > > at java.io.InputStreamReader.read(InputStreamReader.java:239)
> > > at java.io.BufferedReader.fill(BufferedReader.java:137)
> > > at java.io.BufferedReader.read(BufferedReader.java:154)
> >
> > ----------------------------------------------------------------------
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
PGP signature