Fix for hang in search_content()
- From: Pavel Roskin <proski gnu org>
- To: <mc2-devel nuclecu unam mx>, <mc-devel gnome org>, "Andrew V. Samoilov" <sav bcs zp ua>
- Subject: Fix for hang in search_content()
- Date: Thu, 26 Apr 2001 19:56:49 -0400 (EDT)
Hello, Andrew!
You last patch for find.c does more than the ChangeLog says. This change
in search_content() is not described in ChangeLog.
- while (1){
- i = read (pipe, &c, 1);
- if (i != 1)
- break;
+
+ while ((i = read (pipe, &c, 1)) == 0){
If you think it's a formatting change, look again - it's not. Sometimes
(too often actually!) read() returns values other than 0 and 1, for
example -1.
If you want to rewrite this part in a clear, nice way you are welcome to,
but for now I'm reverting this part of your patch since it causes a
useless loop with 100% CPU load while attempting to search for contents.
--
Regards,
Pavel Roskin
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]