On Mon, 20 Mar 2006, D.Pageau wrote:

> I have to redirect both stdin & stdout to com1
>
> lrz -X -vv foo.bin > /dev/ttyS0 < /dev/ttyS0
> bash: /dev/ttyS0: Permission denied
>
> This is working on *nix but not with Cygwin.  Why ?

According to the strace, bash opens the port twice, using O_CREAT|O_TRUNC
when redirecting output, and Windows apparently doesn't allow opening a
serial port for writing in that mode after opening it for reading (and
vice versa).

> any work around ?

Well, bash does offer an input/output redirection with the '<>'
operator...  Did you try that?

Also, duplicating the file descriptor might work (e.g., </dev/ttyS0 >&0).

> CYGWIN_NT-5.0 foo 1.5.20(0.155/4/2) 2006-03-19 16:11 i686 Cygwin

HTH,
        Igor
-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_            [EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'    -.  ;-;;,_            Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'           old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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

Reply via email to