      [channels (keep #(% :from) (vals @started))]
      (let [[[message id args] ch] (alts! (conj channels (timeout 100)))]
        (case message
-         :line (println id " read " message " with args: " args)
+         :line (println "process " id " read " message " with args: " args)
          :exit (dosync (alter started dissoc id) (println id " exited"))
          nil)
        (recur (keep #(% :from) (vals @started)))))

             :http-error [:http-error "whoops! http error!"]
             :exit (do (println "dieing!") [:quit])
             true [:http-error "whoops! that's not a signal we understand"])]
       (>! output (if response response []))) ; send some data so we can recur the http
     (recur (<! input)))
     
    ;; read the signals from the started processes

    ;; read messages from the command input
    (go-loop 
     [[message & args] (<! input)]
     (let [response ; capture the response from processing the message
           (case message
             :start (let [[id & rest] args]
                      ;; Could add a test for id == :all here
                      (if (scripts id)
                        (dosync
                         (alter started assoc id (start-process id (scripts id))))
                        ;; Else there's an error
                        [:error :notfound]))
             :deploy (let [[id & rest] args] (println "redeploy " id " " args))
             :kill (let [[id & rest] args]
                     (when (@started args)
                       (>! ((@started args) :from) :kill)))
