bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gawk-stable] bug: fatal error when getline from directory


From: Aharon Robbins
Subject: Re: [gawk-stable] bug: fatal error when getline from directory
Date: Tue, 06 Jan 2009 07:30:44 +0200

> Date: Mon, 5 Jan 2009 17:38:49 -0500
> From: "Andrew J. Schorr" <address@hidden>
> To: Paolo <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, address@hidden,
>         address@hidden, address@hidden, address@hidden, address@hidden
> Subject: Re: [gawk-stable] bug: fatal error when getline from directory
>
> On Mon, Jan 05, 2009 at 11:27:40PM +0100, Paolo wrote:
> > pls see attached diffs, it's just a POC for '/dir/' extension - I 
> > know it'd be in extension/, likely not portable etc., and likely won't
> > ever make it into official code - but just for fun and perhaps future ref,
>
> Hmmm, my first thought was that this could be implemented as
> an extension using the register_open_hook feature (the same
> way XML hooks in), but now I'm concerned that the existing
> open_hook feature is called after the file is opened, so
> this prevents the file from being opened with opendir()
> instead of open().  I wonder if we need to push the open_hook
> feature up a bit to support this...
>
> Regards,
> Andy

Yeah, I'd rather see this kind of thing be done with the open hook.
Andy, if you can submit diffs that make this kind of thing work, along
with a POC to implement reading a directory, I'd be very interested.

I tend to think that reading a directory should return a record with
two fields: the inode number and the filename, and not just the filename.

While Paolo's original diff is straightforward, I'd prefer not to
include it as it's feature creep; I'd rather beef up the infrastructure
to support doing this kind of thing as an extension.

Thanks!

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]