On Fri, 19 Jan 2007, Tobias Ulmer wrote:
> On Fri, Jan 19, 2007 at 11:07:14AM -0500, Adam wrote:
> > Darrin Chandler <[EMAIL PROTECTED]> wrote:
> >
> > > On Thu, Jan 18, 2007 at 05:17:50PM -0500, Adam wrote:
> > > > Why does fopen()ing a directory for reading succeed instead of failing
> > > > wi
On Fri, Jan 19, 2007 at 11:07:14AM -0500, Adam wrote:
> Darrin Chandler <[EMAIL PROTECTED]> wrote:
>
> > On Thu, Jan 18, 2007 at 05:17:50PM -0500, Adam wrote:
> > > Why does fopen()ing a directory for reading succeed instead of failing
> > > with EISDIR? This has the possibly unexpected consequen
On Fri, Jan 19, 2007 at 11:07:14AM -0500, Adam wrote:
> If you can't fread() from a stream
> that is associated with a directory, then why associate the stream with
> a directory in the first place?
Does the C (or any) standard say it should fail? fopen(3) works on
directories under Linux and Sol
Darrin Chandler <[EMAIL PROTECTED]> wrote:
> On Thu, Jan 18, 2007 at 05:17:50PM -0500, Adam wrote:
> > Why does fopen()ing a directory for reading succeed instead of failing
> > with EISDIR? This has the possibly unexpected consequence of letting
> > you pass yyin to yylex() as a fopen()ed direct
On Thu, Jan 18, 2007 at 05:17:50PM -0500, Adam wrote:
> Why does fopen()ing a directory for reading succeed instead of failing
> with EISDIR? This has the possibly unexpected consequence of letting
> you pass yyin to yylex() as a fopen()ed directory, which then thinks it
> finished successfully be
Adam writes:
> Why does fopen()ing a directory for reading succeed instead of failing
> with EISDIR? This has the possibly unexpected consequence of letting
I believe it is so things like "grep -r regex *" work.
// marc
Why does fopen()ing a directory for reading succeed instead of failing
with EISDIR? This has the possibly unexpected consequence of letting
you pass yyin to yylex() as a fopen()ed directory, which then thinks it
finished successfully because fread() returns 0 immediately.
Adam
7 matches
Mail list logo