From 6cef216e599a87cc9ff02ac68408d34c941de84c Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 12 Apr 2007 23:14:05 +0000 Subject: Try calling the interpreter explicitly on restart if exec'ing /bin/bash fails --- lib/rbot/ircbot.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index e3e4517b..b1ffb51f 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -1077,6 +1077,8 @@ class Bot debug "going to exec #{$0} #{@argv.inspect} from #{@run_dir}" Dir.chdir(@run_dir) exec($0, *@argv) + rescue Errno::ENOENT + exec("ruby", *(@argv.unshift $0)) rescue Exception => e $interrupted += 1 raise e -- cgit v1.2.3