Revert "Use :pgroup option when starting subprocesses"
This reverts commit 308fb9bc94
.
This commit is contained in:
parent
fc200da975
commit
c74fae9f8e
1 changed files with 15 additions and 28 deletions
23
plug.vim
23
plug.vim
|
@ -1004,22 +1004,6 @@ function! s:update_ruby()
|
|||
%["#{arg.gsub('"', '\"')}"]
|
||||
end
|
||||
|
||||
require 'rubygems'
|
||||
require 'thread'
|
||||
require 'fileutils'
|
||||
require 'timeout'
|
||||
|
||||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('1.9')
|
||||
def popen cmd
|
||||
IO.popen(cmd, :pgroup => true)
|
||||
end
|
||||
def killall pid
|
||||
Process.kill 'TERM', - pid rescue nil
|
||||
end
|
||||
else
|
||||
def popen cmd
|
||||
IO.popen(cmd)
|
||||
end
|
||||
def killall pid
|
||||
pids = [pid]
|
||||
unless `which pgrep 2> /dev/null`.empty?
|
||||
|
@ -1033,7 +1017,10 @@ function! s:update_ruby()
|
|||
end
|
||||
pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil }
|
||||
end
|
||||
end
|
||||
|
||||
require 'thread'
|
||||
require 'fileutils'
|
||||
require 'timeout'
|
||||
running = true
|
||||
iswin = VIM::evaluate('s:is_win').to_i == 1
|
||||
pull = VIM::evaluate('s:update.pull').to_i == 1
|
||||
|
@ -1100,7 +1087,7 @@ function! s:update_ruby()
|
|||
File.unlink tmp rescue nil
|
||||
end
|
||||
else
|
||||
fd = popen(cmd).extend(PlugStream)
|
||||
fd = IO.popen(cmd).extend(PlugStream)
|
||||
first_line = true
|
||||
log_prob = 1.0 / nthr
|
||||
while line = Timeout::timeout(timeout) { fd.get_line }
|
||||
|
|
Loading…
Reference in a new issue