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

How to terminate a Xamarin application?

If you are using Xamarin.Forms create a Dependency Service. Interface public interface ICloseApplication { void closeApplication(); } Android : Using FinishAffinity() won’t restart your activity. It will simply close the application. public class CloseApplication : ICloseApplication { public void closeApplication() { var activity = (Activity)Forms.Context; activity.FinishAffinity(); } } IOS : As already suggested above. public … Read more

Terminate a process tree (C for Windows)

Check this thread for grouping processes within a “job”. If that does not work for you, a home grown approach might go as follows: Get your main process ID Call CreateToolhelp32Snapshot to enumerateall the processes on the system Check the th32ParentProcessID member of the PROCESSENTRY32 structure on each process, if it matches your parent ID, … Read more