Created
October 2, 2018 12:17
-
-
Save charger/1d361bc1645ee4d245df44985100506c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/spec/support/the_service.rb | |
class TheServiceControl | |
#.... | |
def stop | |
return if @pid.nil? | |
print "Stopping TheService (PID: #{@pid}). " | |
Process.kill("KILL", -Process.getpgid(@pid)) | |
res = Process.wait | |
@pid = nil | |
puts "Stopped. #{res}" | |
end | |
#.... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment