From: Gabriel Corona Date: Thu, 6 Nov 2014 13:14:31 +0000 (+0100) Subject: [mc] Fix the stack-cleaner X-Git-Tag: v3_12~732^2~223 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9d6a87d9647ab5ea326a5119ae5015044ca1b310 [mc] Fix the stack-cleaner * '1 => tempfile' does not work on some versions of Ruby; * make sure the system() arg is not passed to the shell. --- diff --git a/tools/stack-cleaner/as b/tools/stack-cleaner/as index dcdb491e48..1a66dd3798 100755 --- a/tools/stack-cleaner/as +++ b/tools/stack-cleaner/as @@ -35,7 +35,9 @@ def wrapped_as(argv) # Generate temp file tempfile = Tempfile.new("as-filter") - unless system(File.dirname($0) + "/clean-stack-filter", 0 => input, 1 => tempfile) + tempfile.close + script = File.dirname($0) + "/clean-stack-filter" + unless system([script, script], 0 => input, 1 => tempfile.path) status=$?.exitstatus FileUtils.rm tempfile exit status