From 03461c6eb1d617191ba2b6bd48668cb59fb05163 Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 28 Nov 2003 17:38:08 +0000 Subject: [PATCH] more defensive programming for SIGIO (*groan*) --- io/io_canread.c | 1 + io/io_canwrite.c | 1 + 2 files changed, 2 insertions(+) diff --git a/io/io_canread.c b/io/io_canread.c index 7e8df7c..bc22c11 100644 --- a/io/io_canread.c +++ b/io/io_canread.c @@ -24,6 +24,7 @@ int64 io_canread() { if (!e) break; r=first_readable; first_readable=e->next_read; + e->next_read=-1; debug_printf(("io_canread: dequeue %lld from normal read queue (next is %ld)\n",r,first_readable)); if (e->wantread && e->canread) { #ifdef HAVE_SIGIO diff --git a/io/io_canwrite.c b/io/io_canwrite.c index 0aaec31..f28ef12 100644 --- a/io/io_canwrite.c +++ b/io/io_canwrite.c @@ -24,6 +24,7 @@ int64 io_canwrite() { if (!e) break; r=first_writeable; first_writeable=e->next_write; + e->next_write=-1; debug_printf(("io_canwrite: dequeue %lld from normal write queue (next is %ld)\n",r,first_writeable)); if (e->wantwrite && e->canwrite) { #ifdef HAVE_SIGIO