If Midnight Commander does similar to the above it's pretty silly...
In Perl I normally do something like this in a loop (with a max-loops
@dirs = readdir(FOO);
last unless @dirs;
Clearly that's slack since you could have a million files in a
directory, but you see the point. readdir(2) and getdents(2)
are inherently racy. If your code does not assume such and take
appropriate action, it's broken.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/