lib/coderunner/system_modules/generic_linux.rb in coderunner-0.11.23 vs lib/coderunner/system_modules/generic_linux.rb in coderunner-0.12.0
- old
+ new
@@ -39,10 +39,10 @@
# trap(0){}
# trap(2, 'IGNORE')
# pid = spawn("trap '' 2 && trap '' 0 && " + run_command + " & ")
if prefix = ENV['CODE_RUNNER_LAUNCHER']
launch_id = "#{Time.now.to_i}#{$$}"
- fname = ENV['HOME'] + "/.coderunner_to_launch_#{prefix}/#{launch_id}"
+ fname = CodeRunner.launcher_directory + "/#{launch_id}"
File.open(fname + '.start', 'w'){|file| file.puts "cd #{Dir.pwd};#{run_command}"}
sleep 1 until FileTest.exist? fname + '.pid'
pid = File.read(fname + '.pid').to_i
FileUtils.rm fname + '.pid'
else