This is more of a ruby question but I thought I’d give a shot over here
as well.
The scenario (for test purposes) I’m trying to accomplish when running
rake on a new Rakefile is:
start a server and get its pid
run things that sends stuff to the server
stop the server
I’ve tried using IO’s popen, fork, thread, even sending the server to
/dev/null when starting it but none of them work as I expected. Once
the server (step 1) starts it just hangs in there, not letting the
following steps to run. But if I kill the server (control+c) the step 2
tries to run and fails because the server is no longer running.