Description
Assuming a rails project and rspec-mode are configured to use spring, e.g. with bin/spring
: when no spring server was running yet, starting an rspec-mode compilation starts the spring server process as expected, but stops it immediately after the compilation run finishes instead of keeping it running.
When the spring server was started outside of Emacs before, e.g. from a terminal, this is not an issue – the running server is used by the compilation and keeps running after the compilation is finished.
The problem is that Emacs' compilation sends a SIGHUP on completion, but spring traps only SIGINT and SIGQUIT, not SIGHUP – stopping the server when the user closes the terminal is the desired behavior (I read somewhere on spring's GitHub issues).
What would be a good way to prevent the server getting stopped? Is there a way to configure rspec-mode / compilation-mode to not send that signal? Or is there something on spring that can be done about it?