+2001-02-13 Tom Tromey <tromey@redhat.com>
+
+ Fix for PR libgcj/1351:
+ * posix.cc (_Jv_select): Throw InterruptedIOException if thread is
+ interrupted.
+ Include Thread.h and InterruptedIOException.h.
+
2001-02-13 Bryce McKinlay <bryce@albatross.co.nz>
* java/io/BlockDataException.java: Removed.
// posix.cc -- Helper functions for POSIX-flavored OSs.
-/* Copyright (C) 2000 Free Software Foundation
+/* Copyright (C) 2000, 2001 Free Software Foundation
This file is part of libgcj.
#include <errno.h>
+#include <jvm.h>
+#include <java/lang/Thread.h>
+#include <java/io/InterruptedIOException.h>
+
#if defined (ECOS)
extern "C" unsigned long long _clock (void);
#endif
if (r != -1 || errno != EINTR)
return r;
+ // Here we know we got EINTR.
+ if (java::lang::Thread::interrupted ())
+ throw new java::io::InterruptedIOException (JvNewStringLatin1 ("select interrupted"));
+
struct timeval after;
if (timeout)
{