summaryrefslogtreecommitdiff
path: root/lib/chef/daemon.rb
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-10-10 15:20:48 -0700
committersersut <serdar@opscode.com>2013-10-10 15:20:48 -0700
commit273799a8af75e7a76285f1e9b83126ba72667f86 (patch)
tree14394815365f634e5451a533fe4f22eb03e5b6a5 /lib/chef/daemon.rb
parent6a2a80e3fed74433b03a866235b03cda243b38b9 (diff)
downloadchef-273799a8af75e7a76285f1e9b83126ba72667f86.tar.gz
Retain the runlock created during daemonization for the lifetime of the process.
Diffstat (limited to 'lib/chef/daemon.rb')
-rw-r--r--lib/chef/daemon.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/daemon.rb b/lib/chef/daemon.rb
index 1426234645..e5abca29d8 100644
--- a/lib/chef/daemon.rb
+++ b/lib/chef/daemon.rb
@@ -25,6 +25,7 @@ class Chef
class Daemon
class << self
attr_accessor :name
+ attr_accessor :runlock
# Daemonize the current process, managing pidfiles and process uid/gid
#
@@ -33,7 +34,7 @@ class Chef
#
def daemonize(name)
@name = name
- runlock = RunLock.new(pid_file)
+ @runlock = RunLock.new(pid_file)
if runlock.test
# We've acquired the daemon lock. Now daemonize.
Chef::Log.info("Daemonizing..")