Hi All (FreeBSD 5.3 users) - The code fragment works well so far on my freeBSD 5.3 system to fix the -lc_r/KQUEUE bug in the FreeBSD librc - it should be added to sys/kern/kern_event.c and the kenel recompiled. I consistently have 0 KQUEUE entries, and I have compiled xmail with -lc_r so that xmail is using the reentrant functions.
I'll know more as a bit of time goes by! Jeff Jeff Buehler wrote: >By the way, the author of the link I posted previously kindly included >code that he used to solve the prblem on his system. Here it is: > > static int > kqueue_stat(struct file *fp, struct stat *st, struct ucred *active_cred, > struct thread *td) > { > struct kqueue *kq; > int error; > > if ((error = kqueue_aquire(fp, &kq))) > return ENOENT; > KQ_LOCK(kq); > bzero((void *)st, sizeof(*st)); > st->st_size = kq->kq_count; > kqueue_release(kq, 1); > KQ_UNLOCK(kq); > st->st_blksize = sizeof(struct kevent); > st->st_mode = S_IFIFO; > return (0); > } > >I have not tested it yet, but I am going to this evening. > >Jeff > > > >null wrote: > > > >>Greetings all, >>I have several *BSD servers running and I was hoping to implement >>Xmail as a replacement for the sendmail server that is running on them >>now. So I am wondering (having not yet tried it) if there is a Linux >>version of Xmail. And if so, why not run it on BSD with Linux >>compatibility enabled (starting the OS with the Linux ABI). I realize >>this is not a long term solution. But seems as though it might be an >>answer in the short term. >> >>Just a thought. >> >>--Chris >> >> >> >> >> >> >>>On Thu, 3 Mar 2005, Dofri Jonsson wrote: >>> >>> >>> >>> >>> >>>>I had the same problem with KQUEUEs in FreeBSD, although I had no idea >>>>what >>>>the reason was until decker's post. >>>> >>>>So I did as he suggested and recompiled without libc_r and ran XMail, >>>>which >>>>crashed about twenty hours later producing this unhelpful backtrace: >>>> >>>> >>>> >>>> >>>Guys, XMail is multi-threaded, and non reentrant functions are gonna crash >>>it. XMail uses directly the reentrant version of those functions (*_r()) >>>and I hoped that using explicitly those function would avoid the linkage >>>of libc_r. But it seems that the std libc, instead of sanely implement the >>>reentrant functions, just wrap them with the non reentrant version. Please >>>link against >>> >>> >>> >>> >>libc_r and ask ask a fix of the libc library to BSD dudes. >> >> >> >> >>>- Davide >>> >>>- >>>To unsubscribe from this list: send the line "unsubscribe xmail" in >>>the body of a message to [EMAIL PROTECTED] >>>For general help: send the line "help" in the body of a message to >>>[EMAIL PROTECTED] >>> >>> >>> >>> >>> >>> >>- >>To unsubscribe from this list: send the line "unsubscribe xmail" in >>the body of a message to [EMAIL PROTECTED] >>For general help: send the line "help" in the body of a message to >>[EMAIL PROTECTED] >> >> >> >> >> >> > >- >To unsubscribe from this list: send the line "unsubscribe xmail" in >the body of a message to [EMAIL PROTECTED] >For general help: send the line "help" in the body of a message to >[EMAIL PROTECTED] > > > > - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]