Skip to content
This repository has been archived by the owner on Dec 2, 2017. It is now read-only.

Commit

Permalink
Daemon generator fix for when fetcher isn't started courtesy jtanium
Browse files Browse the repository at this point in the history
  • Loading branch information
look committed May 30, 2010
1 parent c79515c commit 9c0eb25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion generators/fetcher_daemon/templates/daemon.rb
Expand Up @@ -63,7 +63,12 @@ def self.stop(daemon)
end
pid = PidFile.recall(daemon)
FileUtils.rm(daemon.pid_fn)
pid && Process.kill("TERM", pid)

begin
pid && Process.kill("TERM", pid)
rescue Errno::ESRCH => e
puts "warning: process #{pid} not found"
end
end
end
end

0 comments on commit 9c0eb25

Please sign in to comment.