how to controller (start/kill) a background process (server app) in ruby

Posted by rubiii on Stack Overflow See other posts from Stack Overflow or by rubiii
Published on 2010-01-02T22:18:09Z Indexed on 2010/05/31 15:33 UTC
Read the original article Hit count: 152

Filed under:
|
|

hey guys,

i'm trying to set up a server for integration tests (specs actually) via ruby and can't figure out how to control the process.

so, what i'm trying to do is:

  1. run a rake task for my gem that executes the integration specs
  2. the task needs to first start a server (i use webrick) and then run the specs
  3. after executing the specs it should kill the webrick so i'm not left with some unused background process

webrick is not a requirement, but it's included in the ruby standard library so being able to use it would be great.

hope anyone is able to help!

ps. i'm running on linux, so having this work for windows is not my main priority (right now).

© Stack Overflow or respective owner

Related posts about ruby

Related posts about process