This is the mail archive of the cygwin-talk@cygwin.com 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: "od" wrong line endings and byte count


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


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