Re: Nasty problem with background fcopy from socket to stdout



I can confirm, that the problem is with stdout. fcopy-ing to a regular file
succeeds as expected. The following works:

set o [open /var/tmp/dmp w]
#set o [open /dev/stdout w]
fconfigure $o -encoding binary -translation binary
fcopy $sock $o -command [list done $conn $db $o]

But using stdout, or even explicitly re-opening /dev/stdout fails with an
empty error message from deep inside fcopy...

-mi
.



Relevant Pages

  • Re: "Streaming" binary files
    ... fcopy $fd stdout ... fconfigure stdout -translation binary ... be aware that fcopy has known bugs. ... IMO it should have higher priority for the Tcl developers, ...
    (comp.lang.tcl)
  • Re: "Streaming" binary files
    ... fconfigure $_fd -translation binary ... fcopy $_fd stdout ... If I replace it with [chan configure], ... Maybe I am doing something wrong, but it really looks like the fcopy ...
    (comp.lang.tcl)
  • Re: "Streaming" binary files
    ... fconfigure $_fd -translation binary ... fcopy $_fd stdout ... garbled image. ... If I replace it with [chan configure], ...
    (comp.lang.tcl)
  • Re: How do you make a prog wait for a file to be ready before reading?
    ... printing it to stdout works because I tested it. ... Why not using a pipe instead of a regular file? ...
    (comp.unix.programmer)