On 2014-02-06 14:58, Michael van Elst wrote:
marc%msys.ch@localhost (Marc Balmer) writes:This delay makes no sense, and I don't think there is a great risk of breaking someone applications.You very easily break almost all automated applications that talk to modems. Dropping DTR for only a few microseconds doesn't cause a connection to terminate.
This whole thread and implementation is broken, I think.The driver should keep the DTR low for as long as approriate. But there is no reason why the close should hang on that.
If you open the port again, while the DTR is low, then the open should block until it is ready. I honestly do not see the point in why this should be tied together with the close call.
This is driver internal stuff and state. No reason why it should be visible to the user level. The fact that a second open would hang is natural in that if the device isn't ready, then open cannot complete. The reason for a device not being ready is another topic, and the answers can be many.
Tying this whole thing to the close is an ugly hack by someone who was lazy, if you ask me.
Johnny