delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/31/05:50:26.1

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3E3A5444.377F597F@phekda.freeserve.co.uk>
Date: Fri, 31 Jan 2003 10:47:32 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Uses of findfirst that eat LFN find handles
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Some uses of findfirst will eat LFN find handles. See
src/libc/posix/unistd/access.c for an example that doesn't.

Guilty files:

src/libc/compat/unistd/_irdlink.c
src/libc/compat/unistd/xsymlink.c
src/libc/posix/glob/glob.c

Possibly guilty files:

src/libc/posix/sys/stat/lstat.c
src/libc/compat/mntent/mntent.c

Currently we have snippets of code like this in access.c, to clean up:

    /* Use _lfn_close_handle so we don't lose a handle.  */
    if (findfirst(fixed_path, &ff, FA_DIREC) == 0)
    {
      if (strcmp(ff.lfn_magic, "LFN32") == 0)
        _lfn_find_close(ff.lfn_handle);
      return 0;
    }

- Raw text -


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