Hi
Recently I found time to track down a file descriptor leaking bug in coquelicot that annoyed us for a while. Essentially at least every 404 leaked some FDs on the @path/.lock path.
Attached is a patch for a spelling typo, making it possible to allow multiple stylesheets, which makes it easier to customize the look&feel and the patch to fix the leaking FD.
best
ng
Recently I found time to track down a file descriptor leaking bug in coquelicot that annoyed us for a while. Essentially at least every 404 leaked some FDs on the @path/.lock path.
it seems that my fix only helped partially and this is also due to a problem in the lockfile library itself:
Applying this patch seems to get rid off the leaking FDs completely in the end.
https://github.com/ahoward/lockfile/pull/13/commits/27c0f5b291211d1e5d8b8d27...
best
ng
FWIW, I have read the patches and they look good to me. The only issue I have is below:
On Tue, Jul 24, 2018 at 10:32:18AM +0200, ng wrote:
@@ -142,7 +155,9 @@ module Coquelicot def read_link(src) File.open(links_path) do |f| until f.eof?
return $1 if f.readline =~ /^#{Regexp.escape(src)}\s+(.+)$/
if m = f.readline.match(/^#{Regexp.escape(src)}\s+(.+)$/)
return m[1]
end end end nil
This is unrelated to the lockfile usage refactoring patch, even though it's IMO a change that makes the code more clear. I would put it into a separate patch.