Overview
| Artifact ID: | eb1e3032e455e3b02432159230861de8befa7eba |
|---|---|
| Ticket: | 462317ffffffffffffffffffffffffffffffffff
Notification when there's no data |
| User & Date: | andreas_kupries on 2001-09-19 05:55:04 |
Changes
- icomment:
Logged In: YES user_id=75003 Ok, it really looks like the situation I thought. expect reads more than is in the buffers, goes to the OS and then gets stuck in the low-level read. That the timer exists and fires is correct, there is data to read (in the buffers). Just not enough to satisfy expect. While looking further through the expect code, beginning with ExpInputProc I noted an inconsistency in the expect channel code. See the following excerpts from exp_chan.c: Line 53: Tcl_ChannelType expChannelType = { "exp",/* Type name. */ /* Expect channels are always blocking */ NULL,/* Set blocking/nonblocking mode.*/ Line 115 (ExpInputProc) /* * Assume there is always enough input available. This will block * appropriately, and read will unblock as soon as a short read is * possible, if the channel is in blocking mode. If the channel is * nonblocking, the read will never block. */ Line 512 (expCreateChannel): Tcl_SetChannelOption(interp,esPtr->channel,"- blocking","0"); In other words, several parts of expect seem to disagree whether the channel is blocking or nonblocking. I fear that the last command (line 512) leaves the generic I/O layer in the tcl core a bit confused. It tries to handle the channel as non-blocking but the low-level file descriptor was never told so. This may allow the generic I/O core in some situations to try to read from the channel when it would not try the same for a blocking channel. Please try to comment out line 512 in exp_chan.c and see if the problem is still there afterward. - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"