We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def run_image_with_cmd(vm_name, arr_of_vm_args, image_name, cmd, timeout = 240) log(cmd) base_cmd = "#{vm_name} #{arr_of_vm_args.join(" ")} \"#{SRC}/target/#{image_name}.image\" #{as_relative_path(Pathname.new(cmd))}" case identify_os when "windows" then system(base_cmd) else log("spawning with timeout #{timeout.to_s} seconds: nice #{base_cmd}") pid = spawn("nice #{base_cmd}", err: STDERR, out: STDOUT) future { sleep(timeout.seconds) log("Killed command for exceeding allotted time: nice #{base_cmd}.") Process.kill('KILL', pid) } Process.wait(pid) end end
Let's try spawn on Windows too, and just nice on non-Windows platforms.
spawn
nice
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Let's try
spawn
on Windows too, and justnice
on non-Windows platforms.The text was updated successfully, but these errors were encountered: