Date: Sun, 23 Aug 1998 17:12:44 +0300 (IDT) From: Eli Zaretskii To: Martin Str|mberg cc: DJGPP-WORKERS Subject: Re: stat c:/con In-Reply-To: <199808222118.XAA29605@father.ludd.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.