class Utils::ProbeServer
def run_job(job)
def run_job(job) output_message "#{job.inspect} about to run now.", :type => :info @pid = fork { exec(*cmd(job.args)) } output_message "#{job.inspect} now running with pid #@pid.", :type => :info Process.wait @pid message = "#{job.inspect} was just run" if $?.success? job.ok = true message << " successfully." output_message message, :type => :success else job.ok = false message << " and failed with exit status #{$?.exitstatus}!" output_message message, :type => :failure end @history += [ @job.freeze ] @history.freeze @job = nil end