Mercurial > hg > octave-nkf > gnulib-hg
view users.txt @ 15988:cd7ac59d8eb5
fts: close parent dir FD before returning from post-traversal fts_read
The problem: the fts-using "mkdir -p A/B; rm -rf A" would attempt to
unlink A, even though an FD open on A remained. This is suboptimal
(holding a file descriptor open longer than needed), but otherwise not
a problem on Unix-like kernels. However, on Cygwin with certain Novell
file systems, (see http://cygwin.com/ml/cygwin/2011-10/msg00365.html),
that represents a real problem: it causes the removal of A to fail
with e.g., "rm: cannot remove `A': Device or resource busy"
fts visits each directory twice and keeps a cache (fts_fd_ring) of
directory file descriptors. After completing the final, FTS_DP,
visit of a directory, RESTORE_INITIAL_CWD intended to clear the FD
cache, but then proceeded to add a new FD to it via the subsequent
FCHDIR (which calls cwd_advance_fd and i_ring_push). Before, the
final file descriptor would be closed only via fts_close's call to
fd_ring_clear. Now, it is usually closed earlier, via the final
FTS_DP-returning fts_read call.
* lib/fts.c (restore_initial_cwd): New function, converted from
the macro. Call fd_ring_clear *after* FCHDIR, not before it.
Update callers.
Reported by Franz Sirl via the above URL, with analysis by Eric Blake
in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sun, 23 Oct 2011 22:42:25 +0200 |
parents | 4eeab6ee310c |
children | 8250f2777afc |
line wrap: on
line source
The following packages appear to be using gnulib and gnulib-tool: CSSC http://git.savannah.gnu.org/cgit/cssc.git Net::CDP http://search.cpan.org/src/MCHAPMAN/Net-CDP-0.09/libcdp/ OPeNDAP http://scm.opendap.org:8090/svn/trunk/ acct http://cvs.sv.gnu.org/viewcvs/acct/acct/ anubis http://cvs.sv.gnu.org/viewcvs/anubis/anubis/ augeas http://augeas.net/ autobuild http://josefsson.org/autobuild/ barcode http://git.sv.gnu.org/cgit/barcode.git/ bison http://git.sv.gnu.org/gitweb/?p=bison.git clisp http://clisp.cvs.sourceforge.net/clisp/clisp/ coreutils http://git.sv.gnu.org/gitweb/?p=coreutils.git cpio http://cvs.sv.gnu.org/viewcvs/cpio/cpio/ cvs http://cvs.sv.gnu.org/viewcvs/cvs/ccvs/ cvsps http://sourceforge.net/projects/cvsps/ diffutils http://git.sv.gnu.org/cgit/diffutils.git/ febootstrap http://people.redhat.com/~rjones/febootstrap/ findutils http://cvs.sv.gnu.org/viewcvs/findutils/findutils/ gcal http://git.savannah.gnu.org/gitweb/?p=gcal.git gdb http://sourceware.org/git/?p=gdb.git;a=summary gettext http://cvs.sv.gnu.org/viewcvs/gettext/gettext/ gengetopt http://git.sv.gnu.org/gitweb/?p=gengetopt.git gmediaserver http://cvs.sv.gnu.org/viewvc/gmediaserver/gmediaserver/ gnuit http://www.gnu.org/software/gnuit/ http://git.savannah.gnu.org/gitweb/?p=gnuit.git gnutls http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/gnutls/?root=GNU+TLS+Library http://git.sv.gnu.org/gitweb/?p=gnutls.git http://repo.or.cz/w/gnutls.git gpg http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/ gsasl http://git.sv.gnu.org/gitweb/?p=gsasl.git gss http://git.sv.gnu.org/gitweb/?p=gss.git gtkreindeer http://git.sv.gnu.org/gitweb/?p=gtkreindeer.git gtk-vnc http://gtk-vnc.codemonkey.ws/hg/outgoing.hg grep http://git.sv.gnu.org/cgit/grep.git/ guile http://cvs.sv.gnu.org/viewvc/guile/guile/guile-core/ gzip http://git.sv.gnu.org/cgit/gzip.git/ hello http://cvs.sv.gnu.org/viewcvs/hello/hello/ hivex http://git.annexia.org/?p=hivex.git icoutils http://riva.ucam.org/svn/cjwatson/src/debian/icoutils/trunk/icoutils/ inetutils http://cvs.sv.gnu.org/viewcvs/inetutils/inetutils/ iwhd http://git.fedorahosted.org/git/?p=iwhd.git jugtail http://cvs.savannah.gnu.org/viewvc/?root=jugtail jwhois http://cvs.sv.gnu.org/viewvc/jwhois/jwhois/ libdap http://scm.opendap.org:8090/svn/trunk/libdap/ libffcall http://savannah.gnu.org/projects/libffcall/ libgnupdf http://cvs.savannah.gnu.org/viewvc/libgnupdf/?root=pdf libguestfs http://libguestfs.org/ libiconv http://libiconv.cvs.sourceforge.net/libiconv/libiconv/ libidn http://git.sv.gnu.org/gitweb/?p=libidn.git libidn2 http://josefsson.org/libidn2/ libksba http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/?root=KSBA libntlm http://git.josefsson.org/?p=libntlm.git;a=summary libprelude https://trac.prelude-ids.org/browser/trunk/libprelude/ libpreludedb https://trac.prelude-ids.org/browser/trunk/libpreludedb/ libtasn1 http://git.savannah.gnu.org/gitweb/?p=libtasn1.git libunistring http://git.sv.gnu.org/gitweb/?p=libunistring.git libvirt http://libvirt.org/ http://git.et.redhat.com/?p=libvirt.git;a=summary m4 http://git.sv.gnu.org/gitweb/?p=m4.git;a=summary mailfromd http://svn.gnu.org.ua/viewvc/mailfromd/trunk/ mailutils http://cvs.sv.gnu.org/viewcvs/mailutils/mailutils/ man-db http://www.chiark.greenend.org.uk/~cjwatson/bzr/man-db/trunk/ miktex https://svn.sourceforge.net/svnroot/miktex/miktex/trunk mini-httpd http://git.sv.gnu.org/gitweb/?p=mini-httpd.git msmtp http://msmtp.cvs.sourceforge.net/msmtp/msmtp/ myserver http://git.sv.gnu.org/gitweb/?p=myserver.git;a=summary nagios-plugins http://nagiosplug.git.sourceforge.net/ netcf http://fedorahosted.org/netcf/ newts http://svn.arete.cc/newts/trunk/ OATH Toolkit http://www.nongnu.org/oath-toolkit/ octave http://hg.savannah.gnu.org/hgweb/octave/ parted http://git.debian.org/?p=parted/parted.git;a=summary patch http://git.sv.gnu.org/gitweb/?p=patch.git prelude-lml https://trac.prelude-ids.org/browser/trunk/prelude-lml/ prelude-manager https://trac.prelude-ids.org/browser/trunk/prelude-manager/ pspp http://git.sv.gnu.org/gitweb/?p=pspp.git radius http://cvs.sv.gnu.org/viewcvs/radius/radius/ recutils http://git.savannah.gnu.org/gitweb/?p=recutils.git reindeer http://git.sv.gnu.org/gitweb/?p=reindeer.git rcs http://git.savannah.gnu.org/cgit/rcs.git sed http://cvs.savannah.gnu.org/viewcvs/sed/?root=sed sharutils http://cvs.savannah.gnu.org/viewvc/sharutils/sharutils/ shishi http://git.sv.gnu.org/gitweb/?p=shishi.git tar http://cvs.sv.gnu.org/viewcvs/tar/tar/ texinfo http://cvs.sv.gnu.org/viewcvs/texinfo/texinfo/ tmpwatch https://fedorahosted.org/tmpwatch/ vc-dwim http://git.sv.gnu.org/gitweb/?p=vc-dwim.git wget http://hg.addictivecode.org/wget/mainline/ wydawca http://svn.gnu.org.ua/viewvc/wydawca/trunk/ wyslij-po http://svn.gnu.org.ua/viewvc/wyslij-po/trunk/ zile http://www.gnu.org/software/zile/ The following packages are using gnulib without gnulib-tool: libtool http://cvs.sv.gnu.org/viewcvs/libtool/libtool/ libgcrypt http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/trunk/?root=Libgcrypt Articles: "Using Gnulib to improve software portability", by Diego 'Flameeyes' Pettenò on December 28, 2005, http://www.linux.com/articles/50702 ----- Copyright (C) 2006-2011 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. ----- Hey Emacs! Local Variables: indent-tabs-mode: nil whitespace-check-buffer-indent: nil End: