method
kill_job
ruby latest stable - Class:
Shell::ProcessController
kill_job(sig, command)public
kill a job
# File lib/shell/process-controller.rb, line 197
def kill_job(sig, command)
@jobs_sync.synchronize(:EX) do
if @waiting_jobs.delete command
ProcessController.inactivate(self)
return
elsif @active_jobs.include?(command)
begin
r = command.kill(sig)
ProcessController.inactivate(self)
rescue
print "Shell: Warn: $!\n" if @shell.verbose?
return nil
end
@active_jobs.delete command
r
end
end
end Related methods
- Instance methods
- active_job?
- active_jobs
- active_jobs_exist?
- add_schedule
- jobs
- jobs_exist?
- kill_job
- sfork
- start_job
- terminate_job
- wait_all_jobs_execution
- waiting_job?
- waiting_jobs
- waiting_jobs_exist?
- Class methods
- activate
- active_process_controllers
- block_output_synchronize
- each_active_object
- inactivate
- new
- wait_to_finish_all_process_controllers