include "../../log.include";
include "../../exit.include";
include "../../sh.include";

system: mysleep myshell
{
	log mylog( 0, "test" );
	exit myexit();
	sh shell( "/bin/sh" );


	process mysleep 1000:
	{
	
		start
		{
			mysleep = shell( "exec sleep 10");
		}
		restart
		{
			mysleep = shell( "exec sleep 10");
		}
		dependfail
		{
			mylog( 5, "nothing depends on this!" );
		}

	}
	process myshell 1000:
	{
	
		start
		{
			myshell = shell( "sleep 10");
		}
		restart
		{
			myshell = shell( "sleep 10");
		}
		dependfail
		{
			mylog( 5, "nothing depends on this!" );
		}

	}
	


	proc checksleep 2000
	{
		if ( mysleep == 0 )
			mylog( 5, "Sleep is not there" );
		else
			mylog( 5, "Sleep is there" );
		endif;
	}
	proc checkshell 2500
	{
		if ( myshell == 0 )
			mylog( 5, "Shell is not there" );
		else
			mylog( 5, "Shell is there" );
		endif;
		myexit(0);
	}		
	

}
