

public class NoExitSecurityManager extends SecurityManager
{
	/**
	 *  Throws an ExitException instead of allowing the VM to terminate.
	 *  AutoBuild.ABExit() must be used to quit the VM.
	 */
	public void checkExit(int status)
	{
		try
		{
			System.getProperty("ABEXIT").equals("true");
		}
		catch (NullPointerException npe)
		{
			// don't allow exit...
			throw new SecurityException("Attempted System.exit()");
		}
	}

	// Allow anything.
	public void checkPermission(java.security.Permission p)
	{}
}
