Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

SIGINT causes an exception when executing with Ruby 2.0 but not with Ruby 1.9.3.

View gist:4424479
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
class MyServer < GServer
end
 
class Launcher
def initialize(servers)
@servers = servers
end
def start
@servers.each { |server| server.start }
end
def join
@servers.each { |server| server.join }
end
def stop
@servers.each { |server| server.stop }
end
end
launcher = Launcher.new(servers) // where servers is a collection of my_server
launcher.start
trap("SIGINT") { launcher.stop; exit }
launcher.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.