From ef39866fa6e6ac91cc64f18573dea22c3f75c6e1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 19 Jan 2015 09:17:51 +0000 Subject: consolidate spawn fix for Ruby [Bug #8770] Ensure we can apply the workaround to dtas-sourceedit and our test cases while also simplifying the existing call sites a little. This will also make for less code churn in 3-5 years down the line when we drop <= 2.1 support. --- bin/dtas-sourceedit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/dtas-sourceedit') diff --git a/bin/dtas-sourceedit b/bin/dtas-sourceedit index 1980141..6ced538 100755 --- a/bin/dtas-sourceedit +++ b/bin/dtas-sourceedit @@ -54,6 +54,7 @@ if st_in.file? || st_in.pipe? buf = $stdin.read commit_update.call(buf) else + include DTAS::SpawnFix tmp = tmpyaml tmp_path = tmp.path do_update = lambda { commit_update.call(File.read(tmp_path)) } @@ -69,7 +70,7 @@ else end trap(:CHLD) { sev.signal } - pid = Process.spawn(cmd) + pid = spawn(cmd) begin r = IO.select(rset) or next r[0].each do |io| -- cgit v1.2.3-24-ge0c7