Move disabling pipe handler to pipe ns

This commit is contained in:
Michiel Borkent 2020-03-21 23:11:14 +01:00
parent 02f5a85db3
commit 962eefcc76
2 changed files with 7 additions and 7 deletions

View file

@ -9,8 +9,9 @@
(identical? :PIPE @pipe-state))
(defn handle-pipe! []
(Signal/handle
(Signal. "PIPE")
(reify SignalHandler
(handle [_ _]
(vreset! pipe-state :PIPE)))))
(when-not (= "true" (System/getenv "BABASHKA_DISABLE_PIPE_HANDLER"))
(Signal/handle
(Signal. "PIPE")
(reify SignalHandler
(handle [_ _]
(vreset! pipe-state :PIPE))))))

View file

@ -285,8 +285,7 @@ Everything after that is bound to *command-line-args*."))
(defn main
[& args]
(when-not (Boolean/valueOf ^String (System/getenv "BABASHKA_DISABLE_PIPE_HANDLER"))
(handle-pipe!))
(handle-pipe!)
#_(binding [*out* *err*]
(prn "M" (meta (get bindings 'future))))
(binding [*unrestricted* true]