| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin-developers/> |
| List-Post: | <mailto:cygwin-developers AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-developers-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin-developers AT sources DOT redhat DOT com |
| X-Authentication-Warning: | myth8.Stanford.EDU: cobbler owned process doing -bs |
| Date: | Fri, 15 Dec 2000 17:38:09 -0800 (PST) |
| From: | Dan Morris <cobbler AT stanford DOT edu> |
| Reply-To: | dmorris AT tiqit DOT com |
| To: | cygwin-developers AT sources DOT redhat DOT com |
| Subject: | Serial blocking read |
| Message-ID: | <Pine.GSO.4.21.0012151727280.7629-100000@myth8.Stanford.EDU> |
| MIME-Version: | 1.0 |
Has anyone else had problems with serial port reads blocking even when
O_NONBLOCK is passed to _read in the 1.1.6-1 DLL?
I noticed that my reads were appropriately non-blocking most of the time, but
blocked whenever "overlapped_armed" was set, because in this case raw_read
never finds out how many bytes are in the serial port's buffer. This patch
seems to fix the problem for me :
121a122,128
> if (overlapped_armed) {
> if (!ClearCommError (get_handle (), &ev, &st))
> goto err;
> else if (st.cbInQue)
> inq = st.cbInQue;
> }
>
If anyone else has found a better solution to this problem, let me know...
otherwise perhaps this patch will fix things.
-Dan
Dan Morris
http://techhouse.brown.edu/dmorris
Tiqit Computers
http://www.tiqit.com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |