SBT stop run without exiting

From sbt version 0.13.5 you can add to your build.sbt cancelable in Global := true It is defined as “Enables (true) or disables (false) the ability to interrupt task execution with CTRL+C.” in the Keys definition If you are using Scala 2.12.7+ you can also cancel the compilation with CTRL+C. Reference https://github.com/scala/scala/pull/6479 There are some … Read more

Terminate a python script from another python script

You could get your own PID (Process Identifier) through import os os.getpid() and to kill a process in Unix import os, signal os.kill(5383, signal.SIGKILL) to kill in Windows use import subprocess as s def killProcess(pid): s.Popen(‘taskkill /F /PID {0}’.format(pid), shell=True) You can send the PID to the other programm or you could search in the … Read more

tech