Permalink
Browse files

Fix warnings

Fix `warning: assigned but unused variable - sess_id`
Fix `warning: assigned but unused variable - pid`
  • Loading branch information...
1 parent d09e132 commit 0a3f9f82d834f8efba1e28947364d29fc61b4807 @exviva committed Feb 21, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/daemons/daemonize.rb
View
@@ -157,14 +157,14 @@ def call_as_daemon(block, logfile_name = nil, app_name = nil)
rd.close
# Detach from the controlling terminal
- unless sess_id = Process.setsid
+ unless Process.setsid
raise Daemons.RuntimeException.new('cannot detach from controlling terminal')
end
# Prevent the possibility of acquiring a controlling terminal
#if oldmode.zero?
trap 'SIGHUP', 'IGNORE'
- exit if pid = safefork
+ exit if safefork
#end
wr.write Process.pid
@@ -210,7 +210,7 @@ def daemonize(logfile_name = nil, app_name = nil)
# Prevent the possibility of acquiring a controlling terminal
#if oldmode.zero?
trap 'SIGHUP', 'IGNORE'
- exit if pid = safefork
+ exit if safefork
#end
$0 = app_name if app_name

0 comments on commit 0a3f9f8

Please sign in to comment.