Boot the server into the process group of the current session. This will cause it to be automatically killed once the session ends (i.e. when the user closes their terminal).
97
98
99
# File 'lib/spring/server.rb', line 97defset_pgidProcess.setpgid(0,SID.pgid)end