| Jean-Luc Fontaine 2006-11-23, 7:04 pm |
| (initial problem:
http://groups.google.com/group/comp...b701337ace68fd8)
Using strace on my 64 bit Fedora Core 6 box, I noticed that there was a
timed-out select() call after the smtp::sendmessage invocation but that that
select() call was on descriptor 20 rather than the 52 corresponding to the
smtp::sendmessage socket.
I suspect a rather big problem in TclUnixWaitForFile() from tclUnixChan.c:
....
int index, bit, numFound, result = 0;
....
memset((void *) readyMasks, 0, 3*MASK_SIZE*sizeof(fd_mask));
index = fd/(NBBY*sizeof(fd_mask));
bit = 1 << (fd%(NBBY*sizeof(fd_mask)));
....
I don't see how the code above can handle descriptors above 31, bit being a 32
bit integer. I actually got bit=2**20 with fd=52... unfortunately I ran out of
time before I could find the exact problem (had to go to the dentist..., I'll be
able to continue next w ).
Anyway, wouldn't it be better to use the FD_SET macro instead?
Your thoughts are highly welcomed!
Jean-Luc
|