Skip to content
New issue

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

細かすぎて伝わらないbugfix #4

Merged
merged 2 commits into from
Jun 23, 2013
Merged

細かすぎて伝わらないbugfix #4

merged 2 commits into from
Jun 23, 2013

Conversation

ujihisa
Copy link
Collaborator

@ujihisa ujihisa commented Jun 22, 2013

lingrのvim部屋にもちょっと書きましたがProcessManagerがpopen使ってるとプロセス異常終了判定がうまくいってないということがわかりました。というわけで最新版ProcessManager使うようにしました。そしてその異常終了判定結果を使ってみることにしました。

この処理のおかげで、かりにruby側のプロセスが異常終了しても自動再起動かけることができるようになりました。たとえば以下のようにしてruby側を意図的にランダムに落ちるようにしたとしても、最新版unite-ruby-require.vimなら復帰できます。

diff --git autoload/unite/sources/ruby_helper.rb autoload/unite/sources/ruby_helper.rb
index 6b1b20b..1e1a7e7 100644
--- autoload/unite/sources/ruby_helper.rb
+++ autoload/unite/sources/ruby_helper.rb
@@ -4,6 +4,7 @@ stdlibs = $LOAD_PATH.grep(/ruby\/\d\.\d\.\d$/).
     Dir.glob("#{l}/**/*.rb").map {|p| p[r, 1] }.compact
   }.
   flatten.sort
+raise 'hi' if rand(2) == 0
 puts stdlibs
 bundler_paths = [(require 'bundler'; Bundler.bundle_path.to_s)] rescue []
 gemlibs = (bundler_paths + Gem.default_path).

@rhysd
Copy link
Owner

rhysd commented Jun 23, 2013

ありがとうございます!
毎回プルリクエスト出してもらうのもアレなので,collaborator に追加させて頂きました.

rhysd added a commit that referenced this pull request Jun 23, 2013
restart the process if the process crashed
@rhysd rhysd merged commit d86fe18 into rhysd:master Jun 23, 2013
@ujihisa
Copy link
Collaborator Author

ujihisa commented Jun 23, 2013

thx
いまこのプラギンのためのVAC記事書いてます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants