This is the mail archive of the
cygwin-talk@cygwin.com
mailing list for the cygwin project.
Re: "od" wrong line endings and byte count
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin-talk at cygwin dot com
- Date: Sun, 02 Jan 2005 18:01:41 -0800
- Subject: Re: "od" wrong line endings and byte count
- Organization: My own little world...
- References: <41D897B8.E802CA0B@dessent.net> <20050103012057.GB444@efn.org> <41D89FC3.C4EEF420@dessent.net> <20050103012920.GA1844@efn.org> <41D8A465.9B66ECC@dessent.net> <20050103015136.GA9682@trixie.casa.cgf.cx>
- Reply-to: Talk Amongst Yourselves <cygwin-talk at cygwin dot com>
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