Alexander Leidinger wrote:
Please try the patch in from the mail to -current with the Message-ID
<[EMAIL PROTECTED]> and report if it works for
you.
I've applied the patch included here, but it leads to an error (the .rej
file shows it). I infer from the reject that a "while" has to be
replaced by an "if", and so I've edited it by hand.
The problem is that my system still shows the same behavior as before :(
Maybe I've applied the wrong patch?
CU,
David.
diff -u -2 -r1.81 fifo_vnops.c
--- fifo_vnops.c13 Jan 2003 00:28:57 - 1.81
+++ fifo_vnops.c9 Feb 2003 17:32:16 -
@@ -227,5 +227,5 @@
}
if ((ap->a_mode & FREAD) && (ap->a_mode & O_NONBLOCK) == 0) {
- while (fip->fi_writers == 0) {
+ if (fip->fi_writers == 0) {
VOP_UNLOCK(vp, 0, td);
error = tsleep((caddr_t)&fip->fi_readers,
@@ -234,4 +234,9 @@
if (error)
goto bad;
+ /*
+* We must have got woken up because we had a writer.
+* That (and not still having one) is the condition
+* that we must wait for.
+*/
}
}
@@ -243,16 +248,16 @@
}
} else {
- while (fip->fi_readers == 0) {
+ if (fip->fi_readers == 0) {
VOP_UNLOCK(vp, 0, td);
- /*
-* XXX: Some race I havn't located is solved
-* by timing out after a sec. Race seen when
-* sendmail hangs here during boot /phk
-*/
error = tsleep((caddr_t)&fip->fi_writers,
- PCATCH | PSOCK, "fifoow", hz);
+ PCATCH | PSOCK, "fifoow", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
if (error)
goto bad;
+ /*
+* We must have got woken up because we had
+* a reader. That (and not still having one)
+* is the condition that we must wait for.
+*/
}
}
***
*** 227,231
}
if ((ap->a_mode & FREAD) && (ap->a_mode & O_NONBLOCK) == 0) {
- while (fip->fi_writers == 0) {
VOP_UNLOCK(vp, 0, td);
error = tsleep((caddr_t)&fip->fi_readers,
--- 227,231
}
if ((ap->a_mode & FREAD) && (ap->a_mode & O_NONBLOCK) == 0) {
+ if (fip->fi_writers == 0) {
VOP_UNLOCK(vp, 0, td);
error = tsleep((caddr_t)&fip->fi_readers,