diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-12 23:14:05 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-12 23:14:05 +0000 |
commit | 6cef216e599a87cc9ff02ac68408d34c941de84c (patch) | |
tree | 279b74deda87c5b2c219d5c033ad7adffbe3fdb3 /lib | |
parent | 16cef9911ffec52af6b4bbb6a15062d123ce0eb8 (diff) |
Try calling the interpreter explicitly on restart if exec'ing /bin/bash fails
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/ircbot.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |