You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/04/22 18:39:20 UTC

[08/10] git commit: escape single quotes when logging

escape single quotes when logging


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/061acf17
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/061acf17
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/061acf17

Branch: refs/heads/master
Commit: 061acf1740d66edd2b90a62635d558a634450c64
Parents: bf557f8
Author: Derek Dagit <de...@yahoo-inc.com>
Authored: Tue Apr 15 13:34:13 2014 +0000
Committer: Derek Dagit <de...@yahoo-inc.com>
Committed: Tue Apr 15 13:34:13 2014 +0000

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/supervisor.clj | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/061acf17/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
index 1630766..0ffb888 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -475,7 +475,9 @@
                      port
                      worker-id])
           command (->> command (map str) (filter (complement empty?)))
-          shell-cmd (->> command (map #(str \' % \')) (clojure.string/join " "))]
+          shell-cmd (->> command
+                         (map #(str \' (clojure.string/escape % {\' "\\'"}) \'))
+                         (clojure.string/join " "))]
       (log-message "Launching worker with command: " shell-cmd)
       (launch-process command :environment {"LD_LIBRARY_PATH" (conf JAVA-LIBRARY-PATH)})
       ))