        (display-result-set rs meta)
        (reset! last-frame-label (format "table: %s" table))))))
 
-(defn- interrupt [signal]
+(defn- interrupt
+  "The signal handler will first put the state in the *interrupt* state.  If the
+  program gets a second signal while in this state, the state goes to *kill*.
+  In this state, the program *tries harder* (calls [[java.lang.Thread/stop]])
+  to quit the current query with the database."
+  [signal]
   (log/debugf "interrupting with signal: %s" signal)
   (let [ieq @interrupt-execute-query]
     (println)

        (catch SQLException e
          (log/error (format-sql-exception e)))))))

(defn- check-interrupt [curr-query-no]
  (let [ieq @interrupt-execute-query]
    (log/debugf "check interrupt: ieq=%s, query no: (%s == %s)"
                ieq curr-query-no @query-no)

    (let [cols (.getColumnCount meta)]
      (take-while identity (repeatedly #(next-row cols))))))

(defn result-set-to-array
  "Return result set `rs` as an array of rows and column names.

Parameters:
  * **header**: the column header data
  * **rows**: a lazy list of maps each representing a row from the result set."
  [rs]
  (let [meta (.getMetaData rs)
        col-count (.getColumnCount meta)
        ;; must for SQLite: get headers before the result set is used up
