X-Spam-Check-By: sourceware.org Message-ID: Date: Mon, 20 Mar 2006 23:48:48 -0500 From: "Lev Bishop" To: cygwin AT cygwin DOT com Subject: Re: Redirect stdin & stdout to serial port In-Reply-To: <441F6689.6070305@infodev.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <441F2482 DOT 2040502 AT infodev DOT ca> <441F6689 DOT 6070305 AT infodev DOT ca> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k2L4n0mf032054 On 3/20/06, D.Pageau wrote: > <> > > no permission denied but output is still stdout This is expected, because <> operator says to open for read/write on descriptor 0. It doesn't say anything about stdout. > &0 > > no permission denied but output is not redirected to /dev/ttyS0, not > stdout either. This is also expected, since ttyS0 was opened for reading, so you can't write on it, even if you do attach it to stdout. I think the solution might be a combination of both of Igor's suggestions cmnd <> /dev/ttyS0 >&0 Ie, open the port read/write on stdin and then dup it to stdout. Let me know if that works. Lev -- 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/