Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (39 sloc) 1.4 KB


This gem aims at being a simple and reliable solution for controlling external programs running in the background on any Ruby / OS combination.

The code originated in the selenium-webdriver gem, but should prove useful as a standalone library.


process ="ruby", "-e", "sleep")

# inherit stdout/stderr from parent!

# or pass an IO ="child-output")


process.alive?    #=> true
process.exited?   #=> false


The object returned from will implement ChildProcess::AbstractProcess.


How the process is launched and killed depends on the platform:

  • Unix : fork + exec
  • Windows : CreateProcess and friends
  • JRuby : java.lang.{Process,ProcessBuilder}
  • IronRuby : System.Diagnostics.Process

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


Copyright (c) 2010-2011 Jari Bakken. See LICENSE for details.

Jump to Line
Something went wrong with that request. Please try again.