Subject: ktruss fails with EWOULDBLOCK/EAGAIN
To: None <muc-lists-netbsd-tech-kern@moderators.muc.de>
From: Michael Core <520079546242-0001@t-online.de>
List: tech-kern
Date: 08/04/2002 13:32:26
Hi,

I have problems using ktruss because with some applications it will always
fail with "ktrace write failed, errno 35, tracing stopped". Therefore, I
commented out the check in line 612 in /sys/kern/kern_ktrace.c. ktruss
does work now but do I risk to push the kernel into an infinite loop?

605   tries = 0;
606   do {
607    error = (*fp->f_ops->fo_write)(fp, &fp->f_offset, &auio607,
608             fp->f_cred, FOF_UPDATE_OFFSET);
609    tries++;
610    if (error == EWOULDBLOCK) 
611      yield();
612  } while ((error == EWOULDBLOCK)/* && (tries < 3)*/);

-- 
Michael