Move disabling pipe handler to pipe ns
This commit is contained in:
parent
02f5a85db3
commit
962eefcc76
2 changed files with 7 additions and 7 deletions
|
|
@ -9,8 +9,9 @@
|
||||||
(identical? :PIPE @pipe-state))
|
(identical? :PIPE @pipe-state))
|
||||||
|
|
||||||
(defn handle-pipe! []
|
(defn handle-pipe! []
|
||||||
(Signal/handle
|
(when-not (= "true" (System/getenv "BABASHKA_DISABLE_PIPE_HANDLER"))
|
||||||
(Signal. "PIPE")
|
(Signal/handle
|
||||||
(reify SignalHandler
|
(Signal. "PIPE")
|
||||||
(handle [_ _]
|
(reify SignalHandler
|
||||||
(vreset! pipe-state :PIPE)))))
|
(handle [_ _]
|
||||||
|
(vreset! pipe-state :PIPE))))))
|
||||||
|
|
|
||||||
|
|
@ -285,8 +285,7 @@ Everything after that is bound to *command-line-args*."))
|
||||||
|
|
||||||
(defn main
|
(defn main
|
||||||
[& args]
|
[& args]
|
||||||
(when-not (Boolean/valueOf ^String (System/getenv "BABASHKA_DISABLE_PIPE_HANDLER"))
|
(handle-pipe!)
|
||||||
(handle-pipe!))
|
|
||||||
#_(binding [*out* *err*]
|
#_(binding [*out* *err*]
|
||||||
(prn "M" (meta (get bindings 'future))))
|
(prn "M" (meta (get bindings 'future))))
|
||||||
(binding [*unrestricted* true]
|
(binding [*unrestricted* true]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue