Skip to content

Commit

Permalink
Merge pull request #44 from amatsuda/⚠️
Browse files Browse the repository at this point in the history
⚠️ assigned but unused variable - restart, sess_id, pid
  • Loading branch information
thuehlinger committed Jan 7, 2016
2 parents d65c55a + 16f3b11 commit 73ffe58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/daemons/application_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def find_applications_by_app_name(app_name)
if x && x.chomp!
processes = x.split(/\n/).compact
processes = processes.delete_if do |p|
pid, name, add = p.split(/\s/)
_pid, name, add = p.split(/\s/)
# We want to make sure that the first part of the process name matches
# so that app_name matches app_name_22

Expand Down
4 changes: 2 additions & 2 deletions lib/daemons/daemonize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ 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
fail Daemons.RuntimeException.new('cannot detach from controlling terminal')
end

Expand Down Expand Up @@ -100,7 +100,7 @@ def daemonize(logfile_name = nil, app_name = nil)

# Prevent the possibility of acquiring a controlling terminal
trap 'SIGHUP', 'IGNORE'
exit if pid = safefork
exit if safefork

$0 = app_name if app_name

Expand Down
2 changes: 1 addition & 1 deletion lib/daemons/monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def watch(application_group)

sleep(1)

Process.detach(fork { a.start(restart = true) })
Process.detach(fork { a.start(true) })

sleep(5)
end
Expand Down

0 comments on commit 73ffe58

Please sign in to comment.