From 177810c910348f9958bff22ec9c543637a2d6e8b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 11 Feb 2016 17:04:56 -0500 Subject: Keep one fd free for the predicates themselves. Otherwise -empty may start failing once the dircache grows. It's still possible to cause failures with $ bfs some/big/dir -empty 3 3) { - ret -= 3; + // Account for std{in,out,err}, and allow one free for the predicates + if (ret > 4) { + ret -= 4; } return ret; -- cgit v1.2.3