delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-Authentication-Warning: | shadizar.dyndns.org: blackwolf set sender to mbarilli AT midsouth DOT rr DOT com using -f |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Can't set CREAD flag on serial port? |
References: | <873c908a8q DOT fsf AT shadizar DOT dyndns DOT org> |
From: | mbarilli AT midsouth DOT rr DOT com |
Date: | Tue, 24 Feb 2004 20:30:12 -0600 |
In-Reply-To: | <873c908a8q.fsf@shadizar.dyndns.org> (mbarilli@midsouth.rr.com's message of "Tue, 24 Feb 2004 14:59:17 -0600") |
Message-ID: | <87y8qr7ux7.fsf@shadizar.dyndns.org> |
User-Agent: | Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3 (gnu/linux) |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
>>>>> "me" == mbarilli <mbarilli AT midsouth DOT rr DOT com> writes: me> I'm trying to write an application to access a serial port on me> a Windows 2000 box, but the CREAD flag doesn't stay set when I me> do `tcsetattr' and check the values with `tcgetattr'. Trying me> to read from the port returns a ``Resource temporarily me> unavailable'' error (as generated from perror). me> ... me> tty_fd = open("/dev/com2",O_RDWR|O_NDELAY|O_BINARY); Doh. Guess that's what I get for cargo-cult programming and not reading the flags I'm passing to `open'. Of course I'll get an error of EAGAIN if I open the port in non-blocking mode (O_NDELAY) and there's nothing available on the wire. The CREAD flag issue was a red herring, apparently. Sorry 'bout that ... -- Michael J. Barillier | ``Those who make peaceful email: mbarilli(at)midsouth.rr.com | revolution impossible will make web: <http://shadizar.dyndns.org/> | violent revolution inevitable.'' Public key available on request. | -- John F. Kennedy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |