Knowing when to pull the plug. Several key factors reveal when it's time to terminate a program.