This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Redirect stdin & stdout to serial port


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.

> </dev/ttyS0 >&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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]