Project

terminate

0.0
No commit activity in last 3 years
No release in over 3 years
Terminate process or kill if timeout.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0
 Project Readme

terminate

Build Status Coverage Status

Terminate process or kill if timeout.

Installation

Add this line to your application's Gemfile:

gem 'terminate'

And then execute:

bundle

Or install it yourself as:

gem install terminate

Usage

You can call Terminate.execute in your ruby program.

# process to terminate
Terminate.execute(pid)

# specify timeout, default 10
Terminate.execute(pid, 30)

# specify SIGNAL, default 'TERM'
Terminate.execute(pid, 30, 'USR1')

Rake

You can alos run by rake:

bundle exec terminate [pid] -- [options]

Eg.

# default timeout is 10 seconds
bundle exec terminate 1234

# set timeout 30
bundle exec terminate 1234 -- -t 30
# or
bundle exec terminate 1234 -- --timeout=30

Command Line

You can alos run by terminate in command line.

terminate [pid] [options]

Eg.

# default timeout is 10 seconds
terminate 1234

# set timeout 30
terminate 1234 -t 30
# or
terminate 1234 --timeout=30

License

The project is released under the MIT license.

Contact

The project's website is located at https://github.com/emn178/terminate
Author: emn178@gmail.com