X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <17393e3e0812191135v64035dfq1e8f25c2a352872@mail.gmail.com>
Date: Fri, 19 Dec 2008 14:35:09 -0500
From: "Matt Wozniski" <godlygeek@gmail.com>
To: cygwin@cygwin.com
Subject: Re: printf goes to serial port?
In-Reply-To: <E464473DC145404FBD632475DDAF55C6@DFW5RB41>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <494BE168.1020600@rettc.com> 	 <E464473DC145404FBD632475DDAF55C6@DFW5RB41>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Note-from-DJ: This may be spam

On Fri, Dec 19, 2008 at 2:30 PM, Gary R. Van Sickle wrote:
>> From: Alex Martin
>>
>> Hello,
>>
>> I have a cygwin environment, running some software I am
>> writing to talk to some serial devices.
>>
>> Somehow, trying to debug why I could not see printf output to
>> console, I ran a serial port sniffer and voila all of my
>> printf commands are writing on the serial port.
>>
>
> I can't say that it would cross my mind to look for my missing printf output
> on a serial port, even if I was using a serial port in other parts of the
> program to talk to something.  Whatever it was that gave you the hunch to do
> that is probably at the core of your problem.

My slightly wild guess is that you do an open() on the serial device
without a controlling terminal and without passing the O_NOCTTY flag,
causing the serial device to become your controlling terminal.

~Matt

--
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/

