delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/08/23/10:12:50

Date: Sun, 23 Aug 1998 17:12:44 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Subject: Re: stat c:/con
In-Reply-To: <199808222118.XAA29605@father.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.980823171216.1451W-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019