~ chicken-core (master) 49e6c4b241424b45c6a0cb8967b7c46765e66229
commit 49e6c4b241424b45c6a0cb8967b7c46765e66229
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Mon Jan 24 19:29:38 2011 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Mon Jan 24 19:29:38 2011 +0100
no panic when fd-list entry has wrong fd registered (reported by zbigniew)
diff --git a/scheduler.scm b/scheduler.scm
index 045c3488..a3efc67c 100644
--- a/scheduler.scm
+++ b/scheduler.scm
@@ -455,10 +455,13 @@ EOF
(##sys#remove-from-timeout-list t))
(##sys#thread-basic-unblock! t)
(loop2 (cdr threads) keep))
- ((not (eq? fd (car p)))
- (panic
- "##sys#unblock-threads-for-i/o: thread on fd-list has wrong FD"))
- ((fdset-test inf outf (cdr p))
+ ((or (not (eq? fd (car p)))
+ ;; thread on fd-list has incorrect
+ ;; file-descriptor registered.
+ ;; We just assume this is the right one and
+ ;; unblock.
+ ;; XXX Needs to be investigated...
+ (fdset-test inf outf (cdr p)))
(when (##sys#slot t 4) ; also blocked for timeout?
(##sys#remove-from-timeout-list t))
(##sys#thread-basic-unblock! t)
Trap