On 2005.11.05 08:08:12 -0800, Chuck Silvers wrote: | hi, | | this change re-introduces the bug that the previous change fixed, | namely that signals do not interrupt the syscall that's waiting | for a packet to arrive or the timeout to expire. for this to work, | it would need to add all previously-unmasked signals to the kqueue | event list (since there doesn't appear to be a way to ask for | multiple signals as one event). I see the problem. | since there's only 1 file descriptor in this case, it seems better | to just go back to the previous pollts() implementation. The objective here was, as the FreeBSD commit log shows: Revision 1.15 / (download) - annotate - [select for diffs], Tue Oct 15 22:28:59 2002 UTC (3 years ago) by iedowse Branch: MAIN CVS Tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1, RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0 Changes since 1.14: +90 -158 lines Use kqueue(2) instead of poll(2) to wait for replies and timeouts in the UDP RPC client code. As a side-effect, this fixes some bugs that might prevent the RPC call from ever timing out for example if the server keeps responding with the wrong xid. This could probably be simplified further by using the EVFILT_TIMER filter. | separately, shouldn't pollts() have replacement version in libpthread | so that changes to the signal mask only affect the current thread's | mask instead of the process-global mask? Good point. I think it should. -- Rui Paulo
Attachment:
pgpeSIs_zb_wR.pgp
Description: PGP signature