Mail Archives: cygwin/2006/07/11/23:57:30
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Victor E. Vaile, IV on 7/11/2006 8:39 PM:
> Hello,
>
> I upgraded my cygwin today from 1.5.19-4 to 1.5.20-1 (along with other various packages to their current versions). I ran updatedb, and
> instead of it taking less than a few minutes, the prompt hadn't returned after several minutes. I fired up procexp.exe (from
> sysinternals.com) and saw that the find.exe process was opening several registry keys in HKCR. This process was taking between 20-45% of my
> cpu as well. I did a quick test of the following command:
>
> /usr/bin/find / \( -fstype proc \) -prune -o -print0
As written, the \( \) are unnecessary in your example.
The reason that this doesn't work is that cygwin's filesystem name
reporting is not very good. Try 'find / -maxdepth 1 -printf '%f:%F ' to
see what I mean. /proc is listed as "unknown", not "proc", as its fstype,
so your above attempt was failing to prune /proc (and hence, that explains
why you were traversing /proc/registry).
As to why it is different now that you upgraded cygwin: a patch was added
that allows readdir() to return virtual directories from within the root
directory, where previously it did not. And /proc is a virtual directory.
So the behavior, while not necessarily nice, is expected; and serves to
illustrate the need to be careful with find when crossing file system
boundaries. Try -xdev, instead of -fstype ... -prune.
> As far as I know the syntax for the find command should work as above.
Only if cygwin were to be patched to actually provide find with the
information it needs to see /proc is -fstype "proc" rather than "unknown".
cygwin.com/acronyms#PTC.
However, if updatedb is trying this, maybe I should look into patching that.
- --
Life is short - so eat dessert first!
Eric Blake ebb9 AT byu DOT net
volunteer cygwin findutils maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEtHMh84KuGfSFAYARArsZAKCT6VtyPzTkreMSCFao2kXmOwkBpgCgu3gP
w1ZvWCsoQINSoONUQwk0Ba8=
=fHBZ
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -