def check_done
      if @exit_status && @audit_closed
        if @audit_close_timeout
          @audit_close_timeout.cancel
          @audit_close_timeout = nil
        end
        if !@exit_status.success?
          RightScale::PolicyManager.fail(@context.payload)
          report_failure("Subprocess #{SubprocessFormatting.reason(@exit_status)}")
        else
          @context.succeeded = true
          RightScale::PolicyManager.success(@context.payload)
          succeed
        end
      elsif @exit_status
        @audit_close_timeout = EM::Timer.new(AUDIT_CLOSE_TIMEOUT) { AuditCookStub.instance.close(@thread_name) }
      end
      true
    end
def check_done
      if @exit_status && @audit_closed
        if @audit_close_timeout
          @audit_close_timeout.cancel
          @audit_close_timeout = nil
        end
        if !@exit_status.success?
          RightScale::PolicyManager.fail(@context.payload)
          report_failure("Subprocess #{SubprocessFormatting.reason(@exit_status)}")
        else
          @context.succeeded = true
          RightScale::PolicyManager.success(@context.payload)
          succeed
        end
      elsif @exit_status
        @audit_close_timeout = EM::Timer.new(AUDIT_CLOSE_TIMEOUT) { AuditCookStub.instance.close(@thread_name) }
      end
      true
    end
Check whether child process exited *and* all audits were processed
 Do not proceed until both these conditions are true
 If the child process exited start a timer so that if there was a failure
 and the child process was not able to properly close the auditing we will
 still proceed and be able to handle other scripts/recipes

 Note: success and failure reports are handled by the cook process for normal
 scenarios. We only handle cook process execution failures here.

 === Return
 true:: Always return true