Mail Archives: djgpp-workers/1998/08/23/10:12:50
On Sat, 22 Aug 1998, Martin Str|mberg wrote:
> > IMHO, this is a bug. Either `stat' should avoid calling
> > `_is_executable' on devices, or `_is_executable' should fail
> > immediately, without reading, when presented with a file that's really a
> > device. I'm not sure which is better.
>
> Well, better to correct the bug at the source. Devices can't ever be
> executed, or? If they can't then _is_executable shouldn't try to read
> from a device.
`_is_executable' cannot detect whether the name it gets is a device
because for this it will need to call `stat' (which will call it
again), or have much of the guts of `stat' spilled into it.
The solution is to prevent `stat' from calling `_is_executable' in the
first place---which is how `stat' should work already. See my other
mail.
- Raw text -