batch mode: force-quit editor application from seperate thread?

I would like to force an exit/quit from the execution of the editor in the batch mode when a seperate thread finds that a timeout has occurred. The problem is of course that I can’t use the Unity-API from a seperate thread. But System.Environment.Exit(1) doesn’t do anything, it doesn’t even throw an Exception.

Suppose the game loop is stuck(!) on an infinite loop, how would you kill the process from within?

If nothing else helps I will use a whole seperate process to guard the automatic smoke tests from stalling indefinitely.

Perhaps you can kill the process that the thread is part of via Process