Compare commits

..

2 Commits

Author SHA1 Message Date
David Dollar
cf269c39da 0.33.0 2012-01-15 13:00:45 -05:00
David Dollar
76cd2e794b Revert "Merge pull request #125 from brainopia/master"
It appears that this is causing issues with process termination.

This reverts commit d2c9ce0f34, reversing
changes made to 98337c92e1.
2012-01-15 12:59:47 -05:00
5 changed files with 5 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
foreman (0.32.0)
foreman (0.33.0)
term-ansicolor (~> 1.0.5)
thor (>= 0.13.6)

View File

@@ -1,2 +1,2 @@
#!/usr/bin/env ruby
exec "#{ARGV.join(' ')} 2>&1"
#!/bin/sh
exec $1 2>&1

View File

@@ -72,16 +72,10 @@ private ######################################################################
def kill_all(signal="SIGTERM")
running_processes.each do |pid, process|
info "sending #{signal} to pid #{pid}"
kill(signal, -pid) or kill(signal, pid)
Process.kill(signal, pid) rescue Errno::ESRCH
end
end
def kill(signal, pid)
Process.kill signal, pid
rescue Errno::ESRCH
false
end
def terminate_gracefully
info "sending SIGTERM to all processes"
kill_all "SIGTERM"

View File

@@ -30,13 +30,11 @@ private
def fork_with_io(command)
reader, writer = IO.pipe
pid = fork do
Process.setpgrp
trap("INT", "IGNORE")
$stdout.reopen writer
reader.close
exec Foreman.runner, replace_command_env(command)
end
Process.detach pid
[ reader, pid ]
end

View File

@@ -1,5 +1,5 @@
module Foreman
VERSION = "0.32.0"
VERSION = "0.33.0"
end