"od" wrong line endings and byte count

Brian Dessent brian@dessent.net
Mon Jan 3 02:01:00 GMT 2005


Christopher Faylor wrote:

> >Redirection is setup by the shell, so the program whose output is
> >redirected has no say on how the file is opened.
> 
> In general, you're right, but the program can use setmode() to control
> the behavior of open fd's, like standard output.  Then it can choose
> whatever behavior it likes.

Yeah, I suspected as much, but couldn't remember the name of the
setmode() function or whether it works on stdin/stdout so I carefully
dodged that issue by only stating that it has no say in how the file is
"open()"ed.  :-)

Brian



More information about the Cygwin-talk mailing list